Skip to content

Instantly share code, notes, and snippets.

View audriusrudalevicius's full-sized avatar

Audrius audriusrudalevicius

View GitHub Profile
input {
udp {
type => "syslog"
port => 5515
}
}
filter {
grok {
match => { "message" => "%{GREEDYDATA:raw_message}" }
@kevinelliott
kevinelliott / 1-macOS-10.12-sierra-setup.md
Last active February 5, 2024 07:22
macOS 10.12 Sierra Setup

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o

anonymous
anonymous / index.html
Created August 11, 2016 18:33
RxJS 5 Operators // source http://jsbin.com/gafede
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>RxJS 5 Operators</title>
<script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.umd.js"></script>
</head>
<body>
@marcanuy
marcanuy / apache_error_log_parser.sh
Last active November 13, 2024 09:25
Apache error log list ordered by most common errors
#!/bin/bash
sed 's^\[.*\]^^g' error.log | sed 's^\, referer: [^\n]*^^g' | sort | uniq -c | sort -n
@jdewit
jdewit / vim74_lua
Last active January 30, 2024 04:57
Installing vim 7.4 with lua on Ubuntu 12.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim
sudo rm /usr/bin/vim
@bhollis
bhollis / blog.js.coffee
Last active July 17, 2021 08:05
A simple, made-up example of the code for a simple AngularJS blog viewer as a more detailed exploration of http://benhollis.net/blog/2014/01/17/cleanly-declaring-angularjs-services-with-coffeescript/ . Yes, I know about `$resource`, but I prefer not to use it.
app = angular.module 'BlogExample', []
# Simple controller that loads all blog posts
app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) ->
# Get all the blog posts
Blog.all().then (posts) ->
$scope.posts = posts
# Extend the $scope with our own properties, all in one big block
# I like this because it looks like declaring a class.
@andreiz
andreiz / classifier.php
Last active August 27, 2024 09:42
A simple example of logistic regression via gradient descent in PHP.
<?php
error_reporting(E_ALL);
define('NUM_FEATURES', 3);
// My dataset describes cities around the world where I might consider living.
// Each sample (city) consists of 3 features:
// * Feature 1: average low winter temperature in the city
// * Feature 2: city population, in millions
@thomaspuppe
thomaspuppe / gist:4000626
Created November 2, 2012 11:49
Track Navigation Timing data from the Browser in Google Analytics
var NAMESPACE = NAMESPACE || {};
NAMESPACE.gaSpeedTrackingJsLoadStart = (new Date()).getTime();
/* All JS ... */
/* Encapsulate "use strict" to this part of the code, while others can still be unstrict. */
(function () {
"use strict";
/* Track JS Parsing time (start was set at the Beginning of the JS) */
@solar
solar / install.sh
Created October 16, 2012 18:06
install mysqld with supervisord
#!/bin/sh
sudo groupadd mysql
sudo mkdir -p /var/mysqld
sudo useradd -r -g mysql -M -d /var/mysqld mysql
sudo chown mysql:mysql /var/mysqld
sudo yum -y install cmake bison gcc-c++
curl -sL http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.28.tar.gz | tar zx
cd mysql-5.5.28/
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/5.5.28 -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_bin
@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM