Skip to content

Instantly share code, notes, and snippets.

<?php
interface Request1 extends BaseRequest
{
function getParam10();
function getParam11();
}
interface Request2 extends BaseRequest
{
function getParam20();
function getParam21();
@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);
}
@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
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 / 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`
@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 / 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 / use-style
Last active December 22, 2015 21:59
Example of usinf use statement with PHP namespaces
<?php
// class User.php
namespace Billing;
class User {
...
}
@coodix
coodix / gist:6449660
Created September 5, 2013 12:48
Remove background and add shadow by ImageMagick
$ convert f4cf6efd198523859819d78c333b63d7.jpg -bordercolor white -border 1x1 -alpha set -channel RGBA -fuzz 1% -fill none -floodfill +0+0 white -shave 1x1 coin.png
$ convert coin.png \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage coin.png