Skip to content

Instantly share code, notes, and snippets.

View davisonio's full-sized avatar
🚀
Focusing

Craig Davison davisonio

🚀
Focusing
View GitHub Profile
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@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"]} ]}'
@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:

@haf
haf / LICENSE
Last active February 14, 2024 11:15
Setting up a digitalocean proxy
https://www.gnu.org/licenses/gpl-3.0.en.html
GNU GENERAL PUBLIC LICENSE v3
@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
@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
@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)
@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 = {}
@chernjie
chernjie / git-gh-setup.sh
Created February 9, 2015 09:25
Fetch Github's Pull Request as a remote branch
#!/usr/bin/env bash
git remote -v | grep fetch | grep github | \
while read remote url _; do
if ! git config --get-all "remote.$remote.fetch" | grep -q refs/pull
then
git config --add "remote.$remote.fetch" \
'+refs/pull/*/head:refs/remotes/'"$remote"'/pull/*'
fi
done
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.)