Skip to content

Instantly share code, notes, and snippets.

View FrankDeGroot's full-sized avatar

Frank de Groot - Schouten FrankDeGroot

View GitHub Profile
@ryanflorence
ryanflorence / static_server.js
Last active July 21, 2024 12:43
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@zmalltalker
zmalltalker / udev_rules_for_nexus_one_on_fedora_14.mdown
Created November 25, 2010 11:49
This is a proven udev rule for running adb in Fedora 14

I had trouble getting the Android toolchain working under Fedora 14 with my Nexus One. The Android documentation only gives the correct udev rules for Ubuntu, so I had to dig around to find something that worked.

The solution

My solution is to add the following into /etc/udev/rules.d/51-nexus-one.rules. You should not need anything besides this to get it working.

SUBSYSTEM=="usb", ATTRS{idProduct}=="4e12", ATTRS{idVendor}=="18d1", MODE="0666" SYMLINK+="android_adb"

After which you run udevadm control --reload-rules, and plug in your phone. At this point, lsusb should display your Nexus in the listing.

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active November 14, 2024 17:18
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@dmytro
dmytro / ssh-multi.sh
Created October 31, 2012 03:46
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
@aaronksaunders
aaronksaunders / index.html
Created May 14, 2013 02:50
SampleKinveyApp Application using AngularJS and Kinvey
<!doctype html>
<html ng-app="sampleKinveyApp">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@dmitshur
dmitshur / gist:6927554
Last active October 5, 2024 06:15
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.
@arunoda
arunoda / gist:7790979
Last active September 10, 2024 08:43
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

## Disable sudo password.
sudo visudo
# Comment: %wheel ALL=(ALL) ALL
# Uncomment: %wheel ALL=(ALL) NOPASSWD: ALL
## Remove stuff of Fedora I'm not using.
sudo yum -y remove bijiben cheese devassistant empathy evolution gnome-boxes gnome-calculator gnome-clocks gnome-contacts gnome-documents gnome-photos gnome-software gnome-user-docs gnome-weather rhythmbox shotwell totem transmission vinagre
sudo yum group remove libreoffice
## Install if I'm feeling vaine.
@ghengeveld
ghengeveld / select-all.js
Last active February 15, 2017 10:34
AngularJS Select All directive
/**
* Directive to instantly enable/disable multiple checkboxes based on a master checkbox.
* Changing slave checkboxes will update the master checkbox accordingly, including the indeterminate state.
*
* Usage example:
*
* <label><input type="checkbox" select-all="theProperties"> Select all</label>
* <div ng-repeat="property in properties">
* <label><input type="checkbox" rel="theProperties" ng-model="property.checked"> {{ property.label }}</label>
* </div>
@ruario
ruario / latest-chrome.sh
Last active June 2, 2023 12:58
This script will find the latest Google Chrome binary package, download it and repackage it into Slackware format.
#!/bin/bash
# latest-chrome Version 1.5
# This script will find the latest Google Chrome binary package,
# download it and repackage it into Slackware format.
# I don't use Chrome for regular browsing but it is handy for
# comparative tests against Vivaldi. :P
# Copyright 2018 Ruari Oedegaard, Oslo, Norway