Skip to content

Instantly share code, notes, and snippets.

@coodix
coodix / check_php_syntax
Created May 23, 2014 06:26
Check syntax in all php files
find ./ -name "*.php" -exec php -l {} \; | grep -v "No syntax"
@coodix
coodix / 30_exim4-config_remote_smtp
Last active August 29, 2015 14:02
exim4 DKIM lookup from file DB
### transport/30_exim4-config_remote_smtp
#################################
# This transport is used for delivering messages over SMTP connections.
DKIM_DB_FILE = /etc/exim4/dkim_lookup.db
DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /etc/exim4/dkim/${lookup{DKIM_DOMAIN_key}lsearch{DKIM_DB_FILE}}
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
DKIM_SELECTOR = ${lookup{DKIM_DOMAIN_selector}lsearch{DKIM_DB_FILE}}
@coodix
coodix / gist:da5f81bd63c112a7c4a7
Created November 27, 2014 20:30
Route to docker containers through boot2docker on mac os x
sudo route -n add 172.17.0.0/16 `boot2docker ip`
interface "enp0s20u2" {
send dhcp-client-identifier ac:7f:3e:e6:76:55;
}
inteface "secondary" "enp0s20u2" {
send dhcp-client-identifier ac:7f:3e:e6:76:55:01;
}
@coodix
coodix / AutoLaunch.scpt
Last active August 29, 2015 14:24
Apple script for creating tabs in iTerm2 after launch
-- tell application "System Events"
-- set position of front window of application process "iTerm" to {590, 290}
-- end tell
tell application "iTerm"
activate
tell current terminal
set number of columns to 120
set number of rows to 30
@coodix
coodix / gist:754758d08196f6db5808
Created August 7, 2015 04:56
VKSaver Save ALL
var i = 0;
var a = document.getElementsByClassName('dob_saver');
for (var i = 0; i < a.length; i++) {
(function(ii) {
setTimeout(function() { a[ii].click(); console.log(ii); }, ii * 2000);
})(i);
}
<?php
interface Request1 extends BaseRequest
{
function getParam10();
function getParam11();
}
interface Request2 extends BaseRequest
{
function getParam20();
function getParam21();
@coodix
coodix / find_my_friends.js
Last active August 29, 2015 14:27 — forked from barkerja/find_my_friends.js
Find My Friends
var options, req, request;
request = require('request');
options = {
uri: 'https://p04-fmfmobile.icloud.com/fmipservice/friends/{account_id}/{unique_device_id}/minCallback/selFriend/refreshClient',
method: 'POST',
headers: {
'X-Apple-AuthScheme': 'Forever',
'Content-type': 'application/json'
matches_set = CommonSet.new(@mysql, @mongo, job)
method = (eval "#{job.args['method']}Method").new(@mysql, @mongo, user, matches_set)