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 | |
#ZPL docs can be found at https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf | |
#This works with Python 3, change the bytes to str if you are using Python 2 | |
import socket | |
#One easy way to find the IP address is with this nmap command | |
# nmap 192.168.0.* -p T:9100 --open |
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
import requests | |
from requests.auth import HTTPBasicAuth | |
import json | |
import sys | |
server = "http://fall.local" | |
auth = HTTPBasicAuth('username', 'password') | |
#get this from somewhere else, this is just an example , maybe from 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
First install brew if you don't have it and XCode if you don't have them already. Also get pip if you don't have it. | |
Get the 10.9 GFortran from http://coudert.name/software/gfortran-4.8.2-Mavericks.dmg | |
(http://gcc.gnu.org/wiki/GFortranBinaries) | |
brew install readline | |
brew install zeromq | |
sudo pip install ipython pyzmq tornado pygments jinja2 | |
#optional python -c 'from IPython.external import mathjax; mathjax.install_mathjax()' |
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
<html> | |
<script language="javascript" src="http://www.biodalliance.org/release-0.10/dalliance-compiled.js"></script> | |
<script language="javascript"> | |
new Browser({ | |
chr: '1', | |
viewStart: 85742000, | |
viewEnd: 85742015, | |
cookieKey: 'human', |
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
import glob | |
import os | |
import sys | |
import json | |
""" | |
Run this bash script to get full version of every version of the API file ever committed | |
The first arg is the file name |
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
tell (current date) to get (it's month as integer) & "-" & day & "-" & (it's year as integer) | |
set MyDay to the result as text | |
set Mytitle to "Daily Email - " as text | |
set Mytitle to Mytitle & MyDay | |
tell application "Microsoft Outlook" | |
set newMessage to make new outgoing message with properties {subject:Mytitle} | |
make new recipient at newMessage with properties {email address:{name:"Name", address:"[email protected]"}} | |
#make new cc recipient at newMessage with properties {email address:{name:"Name", address:"[email protected]"}} |
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
import requests | |
import json | |
#load config from your json files, and convert it to a python dict | |
config = {} | |
payload = {'plugin': ["HelloWorld"], "pluginconfig" : config } | |
headers = {'content-type': 'application/json'} | |
#the number is the primary key of the result to run the plugin on | |
r = requests.post("http://bebop.itw/rundb/api/v1/results/224/plugin/", data=json.dumps(payload), auth=('ionadmin', 'ionadmin'),headers=headers) |
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
#https://github.com/julmon/pg_activity | |
#install | |
sudo aptitude install postgresql-server-dev-8.4 python-virtualenv | |
virtualenv --no-site-packages venv | |
source venv/bin/activate | |
sudo chmod -R 777 /usr/share/man/man1/ | |
pip install https://github.com/julmon/pg_activity/archive/master.zip | |
#run |
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
from __future__ import division | |
import requests | |
import math | |
r = requests.get("http://ionwest.itw/rundb/api/v1/pluginresult/?format=json&endtime__gte=2013-01-10&limit=0") | |
s = [o["state"] for o in r.json["objects"] if o["state"] != "Queued" or o["state"] != "Pending"] | |
success = 0 | |
error = 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
blackbird.ite | |
```apace | |
## | |
## Server-Pool Size Regulation (MPM specific) | |
## | |
# prefork MPM | |
# StartServers: number of server processes to start | |
# MinSpareServers: minimum number of server processes which are kept spare |