Skip to content

Instantly share code, notes, and snippets.

View ivandeex's full-sized avatar
:octocat:
¯\_(ツ)_/¯ BUSY

Ivan Andreev ivandeex

:octocat:
¯\_(ツ)_/¯ BUSY
View GitHub Profile
/**
* @typedef {Object} Person
* @property {String} login Идентификатор сотрудника.
* @property {Number} floor "Домашний" этаж сотрудника.
* @property {String} avatar Ссылка на аватар.
*/
/**
* @typedef {Object} Room
* @property {Number} id Идентификатор переговорки.
<#
.SYNOPSIS
Create a new desktop wallpaper from various sources and optionally overlay some text.
.DESCRIPTION
The script can be run manually, at logon or even as a scheduled task to update the wallpaper regularly
Wallpaper sources include:
- A solid colour
@ivandeex
ivandeex / custom_kernel
Last active August 29, 2015 14:26 — forked from cpuguy83/custom_kernel
Boot Ubuntu with custom kernel on Digital Ocean
apt-get install kexec-tools
# Insert this at the top of /etc/init.d/rcS
if grep -qv ' kexeced$' /proc/cmdline ;then
kexec --load /vmlinuz --initrd=/initrd.img --append='root=LABEL=DOROOT kexeced' &&
mount -o ro,remount / &&
kexec -e
fi
# Then just use apt/dpkg to install whatever kernel you want, e.g. from http://kernel.ubuntu.com/~kernel-ppa/mainline/
@ivandeex
ivandeex / scrapy_random_proxy.py
Last active August 29, 2015 14:25 — forked from therg/randomproxy.py
scrapy middleware for proxy rotation with status checks and retries; http://www.reddit.com/r/Python/comments/2p3z4u/scrapy_how_to_retry_a_302_redirect_with_a_new/
import re
import random
import base64
from scrapy import log
class RandomProxy(object):
def __init__(self, settings):
self.proxy_list = settings.get('PROXY_LIST')
fin = open(self.proxy_list)