Skip to content

Instantly share code, notes, and snippets.

Sebastián Moreno kernelp4nic

Block or report user

Report or block kernelp4nic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View redis-autostart-osx.md

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)

@kernelp4nic
kernelp4nic / spec.clj
Created Aug 3, 2017
clojure.spec on Clojure 1.8
View spec.clj
;;[clojure-future-spec "1.9.0-alpha17"]
;;[org.clojure/test.check "0.9.0"]
(require '[clojure.spec.alpha :as s])
(require '[clojure.future :refer :all])
(require '[clojure.spec.test.alpha :as stest])
(defn ranged-rand
"Returns random int in range start <= rand < end"
[start end]
View if-let-multi-and-when-let-multi.clj
(defmacro assert-all
[& pairs]
`(do (when-not ~(first pairs)
(throw (IllegalArgumentException.
(str (first ~'&form) " requires " ~(second pairs) " in " ~'*ns* ":" (:line (meta ~'&form))))))
~(let [more (nnext pairs)]
(when more
(list* `assert-all more)))))
(defmacro when-let*
@kernelp4nic
kernelp4nic / collectd.conf
Created Feb 6, 2017 — forked from ajayverghese/collectd.conf
Sample collectd configuration to fetch jetty and jvm metrics for monitoring (and send to graphite)
View collectd.conf
#
# Config file for collectd(1).
# Please read collectd.conf(5) for a list of options.
# http://collectd.org/
#
##################
# Global settings
##################
@kernelp4nic
kernelp4nic / install.sh
Created Jul 20, 2016
Install PostGIS and PGrouting on Debian Wheezy from source
View install.sh
#!/bin/bash
#install postgis
apt-get install libxml++2.6-dev libgeos-3.3.3 libgeos-dev libgdal-dev gdal-bin libproj-dev binutils
wget http://postgis.refractions.net/download/postgis-2.0.0.tar.gz
tar xfvz postgis-2.0.0.tar.gz
cd postgis-2.0.0
./configure
make
@kernelp4nic
kernelp4nic / .vimrc
Last active Jul 26, 2016
minimal vimrc for servers
View .vimrc
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
set nocompatible
set showmode
set backspace=2
syntax on
set hlsearch "highlight searched things
set incsearch "incremental search
set laststatus=2 "show status line
set ignorecase "ignore case
View intellij.desktop
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/kernelp4nic/Software/idea-IC-145.1617.8/bin/idea.png
Name[en_US]=IntelliJ
@kernelp4nic
kernelp4nic / nginx.conf
Created Dec 28, 2015 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@kernelp4nic
kernelp4nic / core.clj
Created Dec 28, 2015 — forked from zoldar/core.clj
Exploration of compojure and cemerick/friend with an angle towards integration of cemerick/friend with librarian-clojure.
View core.clj
(ns friendtest.core
(:use midje.sweet
ring.mock.request
compojure.core
friendtest.core
[ring.middleware.session store memory]
[ring.middleware.session.memory :only (memory-store)]
[ring.middleware.session :only (wrap-session)]
[cemerick.friend.util :only (gets)])
(:require [compojure [handler :as handler]]
View Default (OSX).sublime-keymap
[
// Move tabs
//
// {"position": "-1"}, {"position": "+1"}
{"keys": ["alt+1"], "command": "move_tab", "args": {"position": "0"}},
{"keys": ["alt+2"], "command": "move_tab", "args": {"position": "1"}},
{"keys": ["alt+3"], "command": "move_tab", "args": {"position": "2"}},
{"keys": ["alt+4"], "command": "move_tab", "args": {"position": "3"}},
{"keys": ["alt+5"], "command": "move_tab", "args": {"position": "4"}},
{"keys": ["alt+6"], "command": "move_tab", "args": {"position": "5"}},
You can’t perform that action at this time.