Skip to content

Instantly share code, notes, and snippets.

View metafeather's full-sized avatar

Liam Clancy metafeather

View GitHub Profile
@brianm
brianm / .gitignore
Last active April 26, 2024 07:34
Go net/rpc over ssh+netcat and unix domain sockets It would be nice if ssh.Session implemented io.ReaderWriter
local_client
server
client
ext
@aotimme
aotimme / pushstate.nginxconf
Last active June 3, 2022 19:37
Nginx config file to support pushState.
# pushState friendly!
# The setup:
# * website name is `site.com`
# * the API for your running on localhost:3000
# * the root for API calls is at `/api`, and you have authentication routes with root `/auth` (both go to localhost:3000)
# * javascript app is located at `/path/to/javascript/app`
# Assuming you have your server for API calls at localhost port 3000
upstream api_sitecom {
server localhost:3000;
@benbjohnson
benbjohnson / lj.go
Created April 10, 2013 03:27
LuaJIT & Go Integration
package main
/*
#cgo LDFLAGS: -lluajit-5.1
#include <stdlib.h>
#include <luajit-2.0/lua.h>
#include <luajit-2.0/lualib.h>
#include <luajit-2.0/lauxlib.h>
int my_func() {
@miguelgr
miguelgr / user-keymapl.json
Last active October 15, 2021 03:48
ST: sublime-keymap
/*
Created by: Miguel Garcia <[email protected]>
Date: 2013
Github: miguelgr
These keybindings are personalized in order to optimize the working time avoiding
using the mouse
They work with the following packages:
@miguelgr
miguelgr / Preferences.json
Last active January 16, 2017 16:51
ST: user_settings
{
"close_windows_when_empty": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_face": "Menlo",
"font_options": ["subpixel_antialias", "no_bold"],
"font_size": 14.0,
"enable_live_count": true,
"highlight_modified_tabs": true,
"highlight_line": false,
"ignored_packages": [
@benbjohnson
benbjohnson / README.md
Last active February 11, 2019 12:10
LuaJIT + Go Integration Test

Create an empty directory, download the code and run it:

$ mkdir /tmp/lj
$ cd /tmp/lj
$ wget https://gist.github.com/benbjohnson/5622779/raw/e53d227ebdbea8d513b62ad076feb3f6ac1c1594/luajit.go
$ go run luajit.go

And you should see:

@tylerneylon
tylerneylon / learn.lua
Last active June 11, 2025 18:32
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@albrow
albrow / confirm.go
Last active April 16, 2023 03:03
Go (golang): How to ask for user confirmation via command line
import (
"fmt"
"log"
"os"
"sort"
)
// askForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and
// then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as
// confirmations. If the input is not recognized, it will ask again. The function does not return
@jugglinmike
jugglinmike / index.html
Last active February 16, 2021 04:51
Stock chart with d3.chart
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,

Moved

Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.

Why it was moved

Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!