Skip to content

Instantly share code, notes, and snippets.

View Alex0007's full-sized avatar

Alex0007

View GitHub Profile
@Alex0007
Alex0007 / askfm.im-troller.py
Last active August 29, 2015 14:06
ходим по ловушкам для гостей вк UPD. И ПИШЕМ ХУЙНЮ В АСК))
# -*- coding: utf-8 -*-
import string
import time
import re
import random
import vk_api
import requests
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import time
import re
import random
import vk_api
import requests
server:
cache-min-ttl: 3600
prefetch: yes
key-cache-size: 20m
infra-cache-numhosts: 100000
num-threads: 2
do-not-query-localhost: yes
prefetch-key: yes
rrset-roundrobin: yes
outgoing-range: 450
@Alex0007
Alex0007 / polipo.conf
Created January 3, 2015 23:37
polipo configuration file
logSyslog = true
logFile = /var/log/polipo/polipo.log
socksParentProxy = "localhost:9050"
proxyPort = 8118
proxyAddress = "127.0.0.1"
dnsNameServer = "127.0.0.1"
dnsUseGethostbyname = false

Keybase proof

I hereby claim:

  • I am Alex0007 on github.
  • I am alex0007 (https://keybase.io/alex0007) on keybase.
  • I have a public key whose fingerprint is 5AD6 F8BE 5468 F2BA C21E 5F01 F5B9 C404 C50F 5200

To claim this, I am signing this object:

@Alex0007
Alex0007 / .bashrc
Last active October 19, 2015 10:19
nvm non-blocking sourcing
# Replace following lines
export NVM_DIR="/home/USERNAME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
init_nvm()
{
bin=$(echo $1 | awk '{print $1}') # get first word from command string
if [[ -z $NVM_DIR ]] && [[ ! `command -v $bin` ]]; then # if not already inited and no such binary found
export NVM_DIR="/home/USERNAME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
@Alex0007
Alex0007 / My atom snippets
Last active June 12, 2016 20:56
snippets.cson
'.source.js':
'Console log':
'prefix': 'log'
'body': 'console.log(\'$1\', $2$1)$3'
'Console error':
'prefix': 'err'
'body': 'console.error(\'$1\', $2$1)$3'
'Require':
'prefix': 'req'
'body': 'let $1 = require(\'$2$1\')\n$3'
@Alex0007
Alex0007 / bug.js
Created November 9, 2016 19:29
flattenSequentially problem
const xs = require('xstream').default
const flattenSequentially = require('xstream/extra/flattenSequentially').default
const createTestObservable = item => {
return xs.create({
start: function(listener) {
setTimeout(() => {
listener.next(item)
listener.complete()
@Alex0007
Alex0007 / index.js
Created February 24, 2017 23:51
adapt not working
const { Observable } = require('rxjs')
const { makeRouterDriver } = require('cycle-express-driver')
const express = require('express')
const run = require('@cycle/rxjs-run').default
const app = express()
const router = express.Router()
function main({ router }) {
console.log('123', router.get('/'))
openapi: 3.0.0
info:
title: 'Webdock API'
description: 'Webdock awesome API!'
version: 1.0.0
servers:
-
url: 'https://api.webdock.localhost'
description: 'Webdock API parameters'
paths: