Skip to content

Instantly share code, notes, and snippets.

View davisonio's full-sized avatar
🚀
Focusing

Craig Davison davisonio

🚀
Focusing
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@rubenwardy
rubenwardy / mod_debug.lua
Last active January 3, 2022 08:56
Craft recipe checker for Minetest
-- Written by rubenwardy, WTFPL
-- To use:
-- * Save as mod_debug.lua in builtin/game
-- * add dofile(gamepath.."mod_debug.lua") to the last line of builtin/game/init.lua
-- OR
-- * Install as a mod. Needs to be run before any other mod.
local mod = {}
mod.recipes = {}
mod.aliases = {}
@sfan5
sfan5 / collectstatic.sh
Last active July 10, 2022 20:20
Collects media files from mods/games and puts them in a media directory, also creates an index.mth file in the MTHS format
#!/bin/bash
###### Options ######
MINETESTDIR=/home/username/minetest
GAMENAME=minetest_game
WORLDDIR=none
MEDIADIR=./media
LEGACY_SYMLINKS=0
# When settings this up be aware that the Minetest client
@cookrn
cookrn / _requirements.md
Last active December 28, 2015 22:49
Setting up an iPad 1 to be an Ansible Node

Setting up an iPad 1 to be an Ansible Node

  1. Update the iPad (v5.1.1?) to the latest iOS and make a backup using iTunes
  2. Install the sshpass program on your laptop. Ansible will need this to connect over ssh using a password.
  3. Jailbreak the iPad using redsn0w -- you now have Cydia
  4. Use Cydia to install "MobileTerminal", "OpenSSH", "Python", and "Setup Tools"
  5. Follow the "MobileTerminal" instructions in Cydia for changing the default passwords
  6. Locate your iPad's IP address by looking in Settings.app > Wi-Fi and clicking your connected networks detail ">" arrow
  7. SSH into your iPad and make sure you add IP address to list of known hosts
  8. Place IP address into an Ansible hosts file
@Bremaweb
Bremaweb / gist:cd6b803dd4ef918acb67
Created May 6, 2014 02:45
Player sit and lay animations
-- default/player.lua
-- Minetest 0.4 mod: player
-- See README.txt for licensing and other information.
--[[
API
---
default.player_register_model(name, def)
minetest.register_biome({
--The name of the biome. This needs to be unique.
name = "beach",
--The name of the surface node.
node_top = "default:sand",
--How far the surface node goes down.
depth_top = 2,
--The node underneath the surface nodes.
node_filler = "default:sandstone",
--How far the filler nodes go down. (After they end, stone starts.)
@SmallJoker
SmallJoker / itemdrop_whatever_again.lua
Created May 19, 2014 18:11
An other item drop thingie
-- collect items (based on PilzAdam's item_drop mod)
local ttime = 0
minetest.register_globalstep(function(dtime)
ttime = ttime + dtime
if ttime < 1 then return end
ttime = 0
for _,player in ipairs(minetest.get_connected_players()) do
if player:get_hp() > 0 and not player:get_player_control().LMB then
@rubenwardy
rubenwardy / noob_gen.py
Last active August 29, 2015 14:02
Python Noob Generator
# Python Noob Generator by rubenwardy
# License: WTFPL
# See IRC bot using this: https://gist.github.com/rubenwardy/8863c20a75e4faad3562
# Example:
### a random team mate shot your mum also dat enemy scouted a
### random gun and a random gun covered a random gun but also your
### mum nuked dat arsehole also a random thingy ran it like a arsehole blew up a kid
@morganrallen
morganrallen / _README.md
Last active January 15, 2023 19:41
Janky Browser

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$&gt; npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download