Skip to content

Instantly share code, notes, and snippets.

View gourneau's full-sized avatar

Joshua Gourneau gourneau

View GitHub Profile
@gourneau
gourneau / fast-apt.sh
Created June 10, 2016 18:09
Use apt-select to select the fastest Ubuntu mirror
# Here is a simple script using apt-select to find the fastest package mirror.
# It will replace (and backup) the existing /etc/apt/sources.list file
sudo apt update
sudo apt-get install python-bs4 wget python
wget https://github.com/jblakeman/apt-select/archive/master.zip
unzip master.zip
@gourneau
gourneau / blink.sh
Created November 12, 2015 05:55
blink.sh
root@backbone:/etc# pip uninstall shinken
Uninstalling Shinken-2.4:
/usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/DESCRIPTION.rst
/usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/METADATA
/usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/RECORD
/usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/WHEEL
/usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/metadata.json
/usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/top_level.txt
/usr/local/lib/python2.7/dist-packages/etc/init.d/shinken
/usr/local/lib/python2.7/dist-packages/etc/init.d/shinken-arbiter
@gourneau
gourneau / gist:12b2813cbb00a673f837
Created March 7, 2015 04:28
synthesize install log
synthego@graphs:~/synthesize$ sudo ./install
[sudo] password for synthego:
+++ dirname ./install
++ cd .
++ pwd
+ SYNTHESIZE_HOME=/home/synthego/synthesize
++ cut -s -f 2
++ grep '^Descrip'
++ lsb_release -a
+ UBUNTU_RELEASE='Ubuntu 14.04.2 LTS'
@gourneau
gourneau / gist:f097f98af0c813456603
Created January 29, 2015 02:30
pyzmq ironpython install
C:\Documents and Settings\Synthego\My Documents\Downloads\pyzmq-ironpython-backend\pyzmq-ironpython-backend>ipy -X:FullFrames setup.py install --user
running configure
Found zmq at: C:\Program Files\ZeroMQ 4.0.3
************************************************
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: C:\Program Files\ZeroMQ 4.0.3
ZMQ version detected: 4.0.3
Warning: Detected ZMQ version: 4.0.3, but pyzmq targets ZMQ 4.0.4.
Warning: libzmq features and fixes introduced after 4.0.3 will be unavailable.
************************************************
@gourneau
gourneau / gist:798087d821458a4d62e5
Created January 29, 2015 02:10
pyzqm ironpython install error
C:\Documents and Settings\Synthego\My Documents\Downloads\pyzmq-ironpython-backend\pyzmq-ironpython-backend>ipy setup.py install --user
running configure
Found zmq at: C:\Program Files\ZeroMQ 4.0.4
************************************************
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: C:\Program Files\ZeroMQ 4.0.4
error: IronPython.Runtime.Exceptions.OSException: cannot load library C:\Program Files\ZeroMQ 4.0.4\bin\libzmq-v110-mt-4_0_4.dll
at IronPython.Modules.CTypes.LoadLibrary(String library, Int32 mode)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
@gourneau
gourneau / ElasticSearch.sh
Last active December 12, 2017 21:06
Elastic Search 1.4.2 with Oracle Java 8
### Install Oracle Java 8, this means you agree to their binary license!!
cd ~
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo aptitude -y install oracle-java8-installer
### Download and Install ElasticSearch
@gourneau
gourneau / designer.html
Created October 24, 2014 22:06
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@gourneau
gourneau / zpl-tcp.py
Created September 11, 2014 17:23
Python ZPL over TCP/IP Example
#!/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