Skip to content

Instantly share code, notes, and snippets.

View smoyer64's full-sized avatar

Steve Moyer smoyer64

  • ConsenSys - @INFURA
  • Boalsburg, PA
View GitHub Profile
@Bekt
Bekt / git101
Last active August 29, 2015 14:02
Git 101
# This is a Git cheat-sheet for beginners.
# 1. Initial clone
git clone <package name>
# 2. Checkout a new branch
git checkout -b <feature>
# 3. Make changes
echo "Hack hack hack" >> newfile.txt
@jfro
jfro / update-dns.sh
Created January 11, 2012 17:31
Linode dynamic DNS updating script
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Uses curl to be compatible with machines that don't have wget by default
LINODE_API_KEY=licensekey
DOMAIN_ID=domainid
RESOURCE_ID=resourceid
WAN_IP=`curl -s http://example.com/whatsmyip.php`
if [ -f $HOME/.wan_ip.txt ]; then
@branflake2267
branflake2267 / MyHelper.java
Created August 5, 2016 21:18
Here is a simple GWT 2.8.0-RC1 JsInterop example showing how to use a JsOverlay and JsProperty to provide access to a String literal array written in javascript.
import com.google.gwt.core.shared.GWT;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
/**
* <script>
* var myobject = ["a", "b", "c"];
@TheHippo
TheHippo / pre-commit
Last active May 6, 2020 16:48
`goimports` pre-commit hook
#!/bin/sh
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# git goimports pre-commit hook
#
# To use, store as .git/hooks/pre-commit inside your repository and make sure
# it has execute permissions.
#
79/02/28. 19.27.34.
PROGRAM DND1
00010 LET J4=1
00030 PRINT
00100 BASE 0
00110 LET X=0
00120 LET J=0
00130 LET K=0
00140 X1=0
@mitchellh
mitchellh / gist:1277049
Created October 11, 2011 01:30
Configure Vagrant VM to use Host DNS for VPN
Vagrant::Config.run do |config|
# ...
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end

Turning Off Github Issues

My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...

Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they

@nickcarenza
nickcarenza / lazy_evaluation.go
Created February 20, 2015 18:35
Golang Lazy Evaluation
package main
import (
"time"
)
type LazyInt chan func() int
// Can't use pointer receiver: invalid operation: l <- (func literal) (send to non-chan type *LazyInt)
func (l LazyInt) Future(i int) {
@lizrice
lizrice / Vagrantfile
Last active February 3, 2023 02:21
Vagrant file for setting up a single-node Kubernetes cluster that I can access from my desktop. Read more: https://medium.com/@lizrice/kubernetes-in-vagrant-with-kubeadm-21979ded6c63
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This script to install Kubernetes will get executed after we have provisioned the box
$script = <<-SCRIPT
# Install kubernetes
apt-get update && apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?