Skip to content

Instantly share code, notes, and snippets.

@kohenkatz
kohenkatz / _README.md
Last active May 18, 2018 19:40
"PostBin" is a simple server that logs all requests to files in TEMP. Partially based on https://gist.github.com/magnetikonline/650e30e485c0f91f2f40

How to run

php -S 0.0.0.0:3001 postbin.php
@kohenkatz
kohenkatz / _README.md
Created April 27, 2018 18:57
Git Flow introduction

How to set up git-flow

Installation - if using git on the command line

Linux

wget https://raw.githubusercontent.com/petervanderdoes/gitflow-avh/develop/contrib/gitflow-installer.sh
sudo bash gitflow-installer.sh install stable
rm gitflow-installer.sh
@kohenkatz
kohenkatz / dslreports.scpt
Last active November 9, 2017 19:21
Mojo Wifi Testing
tell application "Safari"
-- if it is running then
-- quit
-- delay 5
-- end if
activate
open location "http://www.dslreports.com/speedtest"
delay 1
activate
@kohenkatz
kohenkatz / helpers.js
Created October 22, 2017 21:47
Cookie Clicker "Helpers"
function makeCookie() {
Game.shimmerTypes.golden.time = Game.shimmerTypes.golden.maxTime;
}
function clickVisibleCookies() {
Game.shimmers.forEach(function(item) {
if (item.type === 'golden') {
item.l.click();
}
});
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
#!/usr/bin/python
import os
import sys
import csv
import datetime
import time
import twitter
def test():
@kohenkatz
kohenkatz / systemd-spawn-fcgi.sh
Last active August 28, 2017 20:03 — forked from stbuehler/systemd-spawn-fcgi.sh
How to run a FastCGI process as a service under Systemd, based on http://redmine.lighttpd.net/projects/spawn-fcgi/wiki/Systemd/2
#!/bin/bash
set -e
if [ "${LISTEN_PID}" != $$ ]; then
echo >&2 "file descriptors not for us, pid not matching: '${LISTEN_PID}' != '$$'"
exit 255
fi
if [ "${LISTEN_FDS}" != "1" ]; then
@kohenkatz
kohenkatz / run.log
Created September 12, 2014 01:05
Successfully building and running Redis on my in-memory filesystem using bazil.org/fuse
mmkatz@hyperion:/tmp/mmkatz/fuse-test/redis/src$ ./redis-server
13958:C 11 Sep 21:03:08.268 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
13958:M 11 Sep 21:03:08.270 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
13958:M 11 Sep 21:03:08.270 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
13958:M 11 Sep 21:03:08.270 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.9.999 (f5efa9bb/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
@kohenkatz
kohenkatz / output.log
Created July 23, 2014 04:20
Atom plugin build error
Installing atom-color-highlight to C:\Users\moshe\.atom\packages failed
> oniguruma@2.0.0 install C:\Users\moshe\AppData\Local\Temp\apm-install-dir-114622-13172-fbp86q\node_modules\atom-color-highlight\node_modules\oniguruma
> node-gyp rebuild
C:\Users\moshe\AppData\Local\Temp\apm-install-dir-114622-13172-fbp86q\node_modules\atom-color-highlight\node_modules\oniguruma>node "C:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\apm\node_modules\atom-package-manager\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
regposix.c
regposerr.c
@kohenkatz
kohenkatz / lsof.py
Created June 3, 2014 02:38
lsof utility wrapper copied from http://www.remix.net/blog/?p=130
#!/usr/bin/python
from subprocess import Popen, PIPE
import re
class lsof():
"""
lsof wrapper class
An automated wrapper around lsof output that yields