Skip to content

Instantly share code, notes, and snippets.

@nl5887
nl5887 / gist:acec118a0d5f8fcd6986
Created October 27, 2015 12:34
hackpad font change
diff --git a/etherpad/src/static/css/ace2/editor.less b/etherpad/src/static/css/ace2/editor.less
index 28524a9..31d4a9a 100644
--- a/etherpad/src/static/css/ace2/editor.less
+++ b/etherpad/src/static/css/ace2/editor.less
@@ -338,7 +338,7 @@ div.ace-line {
padding-left: @new_left_padding;
padding-right: @new_right_padding;
border-left: @left_border solid white;
- font-size: 17px;
+ font-size: 14px;
@nl5887
nl5887 / main.go
Last active April 27, 2016 18:15
Generate OpenPGP signature using Golang
package main
import (
"bytes"
"crypto/rsa"
"fmt"
"log"
"strings"
"golang.org/x/crypto/openpgp"
@nl5887
nl5887 / merge.php
Created November 2, 2015 15:03
PHP Deep merge function with filter
<?php
// based on drupal_array_merge_deep_array
function MergeDeep($arrays, $filterFn = null) {
return _merge_deep_array($arrays, "", 1, $filterFn);
}
function _merge_deep_array($arrays, $path, $depth, $filterFn) {
// detect if associative or sequential array
if (array_values($arrays) !== $arrays) {
diff --git a/binr/Makefile b/binr/Makefile
index e9876a2..ef0e7d6 100644
--- a/binr/Makefile
+++ b/binr/Makefile
@@ -14,6 +14,8 @@ BINS=rax2 rasm2 rabin2 rahash2 radiff2 radare2 rafind2 rarun2 ragg2 r2agent
# this command needs more love to bring it back
#BINS+=ranal2
+LIBR2=$(call libname-version,libr2.$(EXT_SO),${LIBVERSION})
+
@nl5887
nl5887 / run.sh
Last active January 4, 2016 14:00
cloudpings start
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin/
export GOPATH=/opt/cloudpings/
cd /opt/cloudpings/
tmux new-session -d "go run *.go --port 80"
@nl5887
nl5887 / install.sh
Created January 16, 2016 16:53
building phantomjs on amazon linux
cd /usr/local/src/
yum install -y tmux vim
yum groupinstall 'Development Tools'
yum install libicu-devel libpng-devel libjpeg-turbo-devel freetype-devel
yum install gperf libX11-devel
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.0.0-source.zip
unzip phantomjs-2.0.0-source.zip
cd phantomjs-2.0.0
@nl5887
nl5887 / update.sh
Created January 24, 2016 13:09
Elasticsearch - Update mapping
curl -X PUT 'http://localhost:9200/proxy/pairs/_mapping' -d \'{
"pairs": {
"properties": {
"request" : {
"properties" : {
"headers" : {
"properties" : {
"Authorization": {
"type": "string",
"fields": {
@nl5887
nl5887 / gist:95f5a651acbae867c475
Created January 25, 2016 08:13
Amazon Group instances by region and type for Reservations
> aws ec2 describe-instances --query 'Reservations[*].Instances[*][Placement.AvailabilityZone,InstanceType]' --filters Name=instance-state-code,Values=16 --output text|sort|uniq -c
1 eu-west-1a m3.medium
2 eu-west-1a t2.large
4 eu-west-1a t2.medium
3 eu-west-1a t2.micro
3 eu-west-1a t2.nano
2 eu-west-1b m3.medium
2 eu-west-1b t2.medium
1 eu-west-1c t2.large
1 eu-west-1c t2.small
{
timestamp=$1
spot = ""
if (match($0, /Probe Request \((.*)\)/, arr)) {
spot = arr[1]
}
bssid = ""
@nl5887
nl5887 / elasticsearch.conf
Last active September 1, 2016 13:20
monit configuration
check process elasticsearch with pidfile /var/run/elasticsearch/elasticsearch.pid
start program = "/etc/init.d/elasticsearch start"
stop program = "/etc/init.d/elasticsearch stop"