This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: spawn-cgi | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: fastcgi for python | |
# Description: fastcgi for python using nginx | |
# placed in /etc/init.d. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys, re, smtplib | |
class Mail(object): | |
params = {} | |
server = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first select start and end dates | |
var sum = 0; | |
var a = document.querySelectorAll('.bar-wrapper.single > ul > li > span > em'); | |
var l = a.length; | |
for(var i=0;i<l;i++) | |
sum = sum + Math.round(a[i].childNodes[0].nodeValue); | |
window.alert(sum); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys, os, re, binascii | |
if(len(sys.argv)<2): | |
print 'Errorea: Karpeta argumentu bidez sartu' | |
sys.exit() | |
else: | |
dir = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var bin_utils = require('./bin_utils.js'); | |
var tl_utils = require('./tl_utils.js'); | |
var utils = require('./utils.js'); | |
var telegram = function(publisKeysHex) | |
{ | |
var publicKeysParsed = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = tmpfile(); | |
$metaData = stream_get_meta_data($a); | |
$ftp = ftp_connect('localhost', 21, 30); | |
ftp_login($ftp, 'zital', 'zital'); | |
ftp_fget($ftp, $a, 'a.txt', FTP_BINARY, 0); | |
fseek($a, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rmdirr($folder) | |
{ | |
$aDeny = array('.', '..'); | |
$resources = scandir($folder); | |
foreach($resources as $r) | |
{ | |
if(!in_array($r, $aDeny)) | |
{ | |
$tmp = $folder."/".$r; | |
if(is_dir($tmp)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
based on: http://stackoverflow.com/questions/7160899/websocket-client-in-php/16608429#16608429 | |
FIRST EXEC PYTHON SCRIPT TO GET HEADERS | |
*/ | |
$ws = new ws(array | |
( | |
'host' => '127.0.0.1', | |
'port' => 8080, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# requirements: | |
# pip install tweepy | |
import sys, re, tweepy | |
class Txio(object): | |
params = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /usr/local/bin/apt | |
user=`whoami` | |
commands="apt-get clean; apt-get update; aptitude upgrade; aptitude dist-upgrade" | |
if [ $user != "root" ]; then | |
su root -c "${commands}" | |
else | |
eval $commands | |
fi |
OlderNewer