Skip to content

Instantly share code, notes, and snippets.

View jfrobbins's full-sized avatar

Jon Robbins jfrobbins

  • NC
  • 20:30 (UTC -05:00)
View GitHub Profile
@jfrobbins
jfrobbins / pumpstats
Created June 25, 2013 14:41
simple way to post gitstats summary to a pump.io server
#! /usr/bin/env python
import sys
import os
import subprocess
def getNoteText(fileText):
for line in fileText:
if line.find("<dl><dt>") >= 0:
@jfrobbins
jfrobbins / pump_sub_list.py
Last active December 19, 2015 16:39
follow a list of line delimited users (ie. dianara followers export)
#! /usr/bin/env python3
import sys
import os
import subprocess
from time import sleep
'''
This is a hack that lets you sub to a bunch of users that are line-delimited in a file.
The Dianara client currently can export such a list.
@jfrobbins
jfrobbins / pump-post-stats.sh
Created July 26, 2013 01:58
post some db and network stats for a pump
#!/bin/bash
server=yourpump.pump
port=443
user=yourpumpuser
cd /path/to/pump.io/bin
note=$(echo "DB Stats:
<pre>
@jfrobbins
jfrobbins / gist:6085917
Created July 26, 2013 03:28
Quick Linux DNS IP Updater Python script for FreeDNS (freedns.afraid.org)
"""
Quick Linux DNS IP Updater Python script for FreeDNS (freedns.afraid.org)
Author: Daniel Gibbs
Version: 0.2
URL: http://www.danielgibbs.net/
** Must set update_key and make sure that ip_file is read and writable
This program is free software; you can redistribute it and/or modify it under
@jfrobbins
jfrobbins / post.sh
Created July 28, 2013 02:23
this will post a simple note to status.net and pump.io
#!/bin/bash
##########
# do what you want with this script,
####
# It will edit a note in an editor and then post it to statusnet and pump.io
# You will need to set up a .netrc:
# # .netrc
# #machine quitter.se
# #login <loginname>
# #password <pw>
"""
balancedparentheses.py
Program to check for balanced parentheses in an expression using stack
To run you only need Python3 installed
To exectue:
python3 balancedparentheses.py
modified from the code here: http://www.lifengadget.com/lifengadget/program-to-check-for-balanced-parentheses-in-an-expression/
"""
; balancedparentheses.pb
; Program To check For balanced parentheses in an expression using stack
; To run you only need PureBasic 5.21 LTS installed
;
; To exectue:
; compile w/ PB and run
;
; modified from the code here: http://www.lifengadget.com/lifengadget/program-To-check-For-balanced-parentheses-in-an-expression/
;;;;;;;;;;
#! /usr/bin/env python3
###
# filesplitter.py
#syntax is:
# ./filesplitter.py filename linesPerFile
###
import sys,os
class myfile(object):
//syntax:
// ./filesplitter -file filename.csv -lines=150
//
// source for readlines() and writelines() from here:
// http://stackoverflow.com/questions/8757389/reading-file-line-by-line-in-go
package main
import (
"os"
#! /usr/bin/env python3
###
# original author: Jon Robbins
####
# This file converts markdown-formatted octopress files into markdown-formatted pelican files
# and also "fixes" html links by changing them to md links
###
# octopress2pelican.py
#syntax is:
# ./octopress2pelican.py filename