Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0"?>
<opml version="1.1">
<!--Generated by NewsBlur - www.newsblur.com-->
<head>
<title>NewsBlur Feeds</title>
<dateCreated>2014-09-03 16:23:07.139591</dateCreated>
<dateModified>2014-09-03 16:23:07.139591</dateModified>
</head>
@pronto
pronto / example
Last active August 29, 2015 14:05
pipe things to it; because why not
% cat test.txt | ./geo.py
171.111.153.168 is China
4.2.2.2 is United States
91.188.124.232 is Poland
8.6.6.4 is United States
66.163.128.206 is United States
62.210.38.226 is France
94.173.21.140 is United Kingdom
117.21.191.208 is China
@pronto
pronto / shoot.sh
Last active August 29, 2015 14:01
zsh script to call phantomjs screenshot
#!/usr/local/bin/zsh
if [[ -z $1 ]]; then
echo 'syntax: shootphantom URL [name] (.png will be added for you)'
echo 'if NAME is empty a name will be attempted to be guessed'
return 1
fi
DATE=`date +%s`
URL=$1
echo 'url is:' $URL
if [[ ! -z $2 ]];then
class ScanIP(Base):
__tablename__='ScanIP'
pk = Column(Integer,Sequence('pk'), primary_key=True)
ip = Column(VARCHAR(39))
class ScanPort(Base):
__tablename__='ScanPort'
pk = Column(Integer,Sequence('pk'), primary_key=True)
ip_pk= Column(Integer, ForeignKey('ScanIP.pk'))
class portscan(Base):
__tablename__ = 'portscan'
pk = Column(Integer,Sequence('pk'), primary_key=True)
ip = Column(VARCHAR(39))
dtime = Column(DATETIME) #because we're keeping a log and gonna update it every so
p21 = Column(Boolean)
p22 = Column(Boolean)
p53 = Column(Boolean)
p80 = Column(Boolean)
p443 = Column(Boolean)
@pronto
pronto / sysinfo snip.c
Created November 19, 2013 19:10
Starting at line 331 of proc/sysinfo.c
static void getrunners(unsigned int *restrict running, unsigned int *restrict blocked) {
struct direct *ent;
DIR *proc;
*running=0;
*blocked=0;
if((proc=opendir("/proc"))==NULL) crash("/proc");
while(( ent=readdir(proc) )) {
// ==UserScript==
// @name Replace Text On Webpages
// @namespace http://userscripts.org/users/23652
// @description Replaces text on websites. Now supports wildcards in search queries. Won't replace text in certain tags like links and code blocks
// @include http://*
// @include https://*
// @exclude http://userscripts.org/scripts/review/*
// @copyright JoeSimmons
// @version 1.0.52
// @license http://creativecommons.org/licenses/by-nc-nd/3.0/us/
@pronto
pronto / spaceapi
Created November 6, 2013 19:11
Space API for tmux output
#! /usr/bin/env python
import simplejson
import urllib2
url="http://www.uasstatus.com/spaceapi.json"
out=urllib2.urlopen(url).read()
json=simplejson.loads(out)
if json['open']== True:
line= "#[fg=green,bold]|{0}|"
else:
line= "#[fg=red]|{0}|"