Skip to content

Instantly share code, notes, and snippets.

View prologic's full-sized avatar
👋
Principal SRE, Founder of Yarn.social and Salty.im

James Mills prologic

👋
Principal SRE, Founder of Yarn.social and Salty.im
View GitHub Profile
@prologic
prologic / gist:7d2e357ab806b2718b7c
Created December 16, 2014 23:21
created by github.com/tr3buchet/gister
prologic@daisy
Wed Dec 17 09:22:34
~
$ echo "/1/docs" | nc localhost 70
Error: File or directory not found!
______________________________________________________________________
Gophered by Gophernicus/1.6 on /3.12 x86_64
prologic@daisy
Wed Dec 17 09:23:25
@prologic
prologic / elinks.conf
Created December 16, 2014 12:41
created by github.com/tr3buchet/gister
@prologic
prologic / shoot
Created December 16, 2014 10:29
created by github.com/tr3buchet/gister
#!/bin/bash
#
# By Sirupsen @ http://sirupsen.dk
#
# Description: Very simple script to make you
# select a region of your screen, which will be captured, and
# then uploaded. The URL will then be injected into your clipboard.
#
# Dependencies:
#
@prologic
prologic / gspider.py
Created December 15, 2014 05:20
created by github.com/tr3buchet/gister
#!/usr/bin/env python
from __future__ import print_function
from collections import deque
from gopherlib import Gopher, GopherMenu
@prologic
prologic / Pkgfile
Created December 11, 2014 13:59
created by github.com/tr3buchet/gister
# Description:
# URL:
# Maintainer:
# Packager:
# Depends on:
name=gophernicus
version=1.6
release=1
source=(http://gophernicus.org/software/$name/$name-$version.tar.gz)
@prologic
prologic / gist:1661b2a121d5dff7d78d
Created December 2, 2014 06:54
created by github.com/tr3buchet/gister
>>> from random import randint
>>> import struct
>>> inc = randint(0, 0xFFFFFF)
>>> oid = struct.pack(">i", inc)[1:4]
>>> inc
3266098
>>> oid
'1\xd62'
>>> inc = (inc + 1) % 0xFFFFFF
>>> inc
@prologic
prologic / gist:32d3760ff4f9903b20f3
Created December 1, 2014 22:46
created by github.com/tr3buchet/gister
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkg_resources import parse_version
>>> xs = ['113.8', '114.1', '114.2', '114.9', '114.10']
>>> ys = map(parse_version, xs)
>>> ys
[('00000113', '00000008', '*final'), ('00000114', '00000001', '*final'), ('00000114', '00000002', '*final'), ('00000114', '00000009', '*final'), ('00000114', '00000010', '*final')]
>>> zx = sorted(ys)
@prologic
prologic / gist:b57a81fd87ff5d14084e
Created November 28, 2014 10:28
created by github.com/tr3buchet/gister
$ curl -v -o - http://localhost:3141/root/pypi/+simple/circuits
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 3141 (#0)
> GET /root/pypi/+simple/circuits HTTP/1.1
> User-Agent: curl/7.39.0
> Host: localhost:3141
> Accept: */*
>
* Recv failure: Connection reset by peer
@prologic
prologic / gist:2dfdb0d2747efe912cff
Created November 28, 2014 10:00
created by github.com/tr3buchet/gister
prologic@daisy
Fri Nov 28 20:02:34
~
$ cat .pip/pip.conf
[global]
index-url = http://localhost:3141/root/pypi/+simple/
prologic@daisy
Fri Nov 28 20:02:39
~
@prologic
prologic / gist:29f1b37a1e4f96b01e3b
Created November 23, 2014 09:33
created by github.com/tr3buchet/gister
[prologic|daisy ~]% xterm-255color
if [ -e /usr/share/terminfo/x/xterm-256color ]; then
export TERM='xterm-256color'
else
export TERM='xterm-color'
fi