Skip to content

Instantly share code, notes, and snippets.

@synchrone
synchrone / itn.php
Created September 18, 2012 12:45
Генератор ИНН
<?php
function random_number($length=1){
$number = array();
for($i=0; $i < $length; $i++){
$number[] = mt_rand(0,9);
}
return $number;
}
function company_itn(){
@synchrone
synchrone / i.conf
Last active January 2, 2016 17:59
Gyazo hosting
server { #generic php-fpm setup, really
server_name i;
root /var/www/i/www;
client_max_body_size 20m;
index index.php index.htm index.html;
location ~ ^.+\.php$ {
if ( -f $document_root/../maintenance) {
return 503;
}
@synchrone
synchrone / .duplicity-config
Last active August 29, 2015 13:57
duplicity to s3
#!/bin/bash
#######
# Keep in mind that Ubuntu 14.04 has a little broken python-boto. I found that installing https://launchpad.net/~chris-lea/+archive/ubuntu/python-boto does help
######
declare -x S3_USE_SIGV4=True #required for eu-central-1
declare -x AWS_ACCESS_KEY_ID=

Keybase proof

I hereby claim:

  • I am synchrone on github.
  • I am synchrone (https://keybase.io/synchrone) on keybase.
  • I have a public key whose fingerprint is 67C2 9A55 5411 FC93 8D07 FF7E 9FB1 575A CF58 CE59

To claim this, I am signing this object:

@synchrone
synchrone / vk.js
Created July 6, 2014 15:12
Kill the wall
// Use with http://vk.com/dev/execute
var owner = ; //your id or public id * -1
var items = API.wall.get({owner_id: owner, count: 100}).items;
var c = 0;
while(c < items.length){
API.wall.delete({owner_id: owner, post_id: items[c].id});
c = c + 1;
}
return items.length;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Mnemonic encoding wordlist</TITLE>
</HEAD>
<BODY>
<H1>About the wordlist</H1>
The most time-consuming part in this project has been the compilation of the
@synchrone
synchrone / .gitignore
Last active May 25, 2017 10:42
A transmission-daemon utility to wrap all http trackers in using https wraper service
vendor
@synchrone
synchrone / dyndns53.py
Last active August 29, 2015 14:07
Use Route53 as your dyndns
#!/usr/bin/env python
from area53 import route53
from boto.route53.exception import DNSServerError
import requests
import sys
from datetime import datetime
# Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/
domain = 'my.domain'
@synchrone
synchrone / ocshot.sh
Last active September 4, 2018 09:42
turns owncloud into gyazo
#!/bin/bash
#############################################
# sudo apt-get install scrot curl libxml2-utils
#############################################
. ~/.ocshotrc
SCREENSHOT_URL=$BASEURL/remote.php/webdav/$SCREENSHOT_DIR
if [ "$1" == '' ]; then
notify-send -u normal -i info --expire-time 1000 "ownCloud Screenshot" "Select the area now"
TMPPATH=/tmp/wdsshot.png
@synchrone
synchrone / burgerbot.rb
Last active May 25, 2023 00:58 — forked from daxadax/burgerbot.rb
burgerbot
#!/usr/bin/env ruby
# encoding: utf-8
require 'watir-webdriver' #requires v 0.9.1
require 'uri'
require 'cgi'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end