Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Lynch klynch

View GitHub Profile
@klynch
klynch / custom.json
Last active Mar 14, 2017
A powerline configuration file that goes in `~/.config/powerline/themes/shell/custom.json`
View custom.json
{
"segments": {
"left": [
{
"function": "powerline.segments.shell.mode"
},
{
"function": "powerline.segments.common.net.hostname",
"priority": 10,
"args": {
View keybase.md

Keybase proof

I hereby claim:

  • I am klynch on github.
  • I am klynch (https://keybase.io/klynch) on keybase.
  • I have a public key whose fingerprint is 83C2 9A65 5915 53E1 F238 BF14 EB65 957F 6943 D60E

To claim this, I am signing this object:

View smtp-sink
sudo python -m smtpd -n -c DebuggingServer localhost:25
View pedantically_commented_playbook.yml
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@klynch
klynch / jenkins-android.sh
Created Jun 12, 2014
Helps set up Android on a jenkins node
View jenkins-android.sh
#https://www.digitalocean.com/community/tutorials/how-to-build-android-apps-with-jenkins
#https://github.com/thecodepath/android_guides/wiki/Building-Gradle-Projects-with-Jenkins-CI
#http://www.snap-interactive.com/blog/automating-our-android-app-with-gradle-and-deploygate/
ANDROID_SDK=android-sdk_r22.6.2-linux.tgz
wget http://dl.google.com/android/$ANDROID_SDK
tar zxvf $ANDROID_SDK
#Make sure the Android tools are on the PATH
View remove-unity.md

Disable Overlay scrollbar in Ubuntu 12.10

gsettings set com.canonical.desktop.interface scrollbar-mode normal

How to remove unity and replace it with cinnamon

Install cinnamon.

@klynch
klynch / android-configure.sh
Created Dec 31, 2013
This script runs a configure script with the Android NDK toolchain You may need to adjust the COMPILE_TARGET and ANDROID_API variables depending on your requirements.
View android-configure.sh
#!/bin/sh
# This script runs a configure script with the Android NDK toolchain
# You may need to adjust the COMPILE_TARGET and ANDROID_API variables
# depending on your requirements.
#
# Call this script in a directory with a valid configure script.
# Example: PREFIX=${PWD}/bin android-configure.sh
# Set the ANDROID_NDK variable to the root
@klynch
klynch / disable_java_sponsors.reg
Created Dec 19, 2013
This is a Windows registery file to disable installing Oracle Crapware.
View disable_java_sponsors.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
"SPONSORS"="DISABLE"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft]
"SPONSORS"="DISABLE"
@klynch
klynch / flac2mp3.sh
Created Oct 1, 2013
An old script I found lying around to convert FLAC files to MP3
View flac2mp3.sh
#!/bin/bash
lame_opts=" --vbr-new -V 2 -B 256 "
for x in "${@}"
do
FLAC=${x}
MP3="${FLAC%.flac}.mp3"
[ -r "$FLAC" ] || { echo can not read file \"$FLAC\" >&1 ; exit 1 ; } ;
View netcat.py
import socket
def netcat(hostname, port, content):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((hostname, port))
s.sendall(content)
s.shutdown(socket.SHUT_WR)
while 1:
data = s.recv(1024)
if data == "":