Skip to content

Instantly share code, notes, and snippets.

@mojavelinux
mojavelinux / build.gradle
Last active March 2, 2017 18:00
A Gradle build that generates a versioned PDF for multiple AsciiDoc documents. Separate tasks are used for illustrative purposes and to allow each conversion to be individually configured.
buildscript {
dependencies {
classpath 'org.asciidoctor:asciidoctorj:1.5.4.1'
}
}
plugins {
id 'org.asciidoctor.convert' version '1.5.3'
id 'com.github.jruby-gradle.base' version '1.3.3'
}
@ancho
ancho / Configuration.java
Last active January 31, 2017 22:20 — forked from jonbullock/Renderer.java
RendererTest for path with dot in it and output file without extension
interface Configuration {
File getSourcePath();
void setSourcePath(File path);
File getTemplatePath();
void setTemplatePath(File path);
File getDestinationPath();
void setDestinationPath(File path);
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 4
#define NUM_LEDS 16
#define BRIGHTNESS 25
@JBlackCat
JBlackCat / rpi2-bitcoin-mine-rig.md
Last active February 24, 2023 18:08
Rapberry-Pi-2-Antminer-U2-CGMiner-Bitcoin-Mining

Fix Formatting and figure out startup script.

  1. Setup a bitcoin wallet. You can find a list of available wallets at https://bitcoin.org/en/choose-your-wallet. I decided to https://www.coinbase.com to start.

  2. Sign up for a bitcoin pool. A comparison of mining pools can be found at https://en.bitcoin.it/wiki/Comparison_of_mining_pools. I found this a bit overwhelming so I decide to start with Slush's pool, (https://mining.bitcoin.cz), as a few tutorials were using it. This video contains some info on setting it up. https://www.youtube.com/watch?v=blDhGFTGuhU

  3. ssh into your raspberry pi

  4. Pull down any updates to any packages you have currently installed, $ sudo apt-get update

  5. Install the updates you just downloaded, $ sudo apt-get upgrade

@marc0der
marc0der / gist:afdd4331f097e7f25e90
Last active August 29, 2015 14:05
Adds new JBake candidate to GVM
$ gvm flush candidates
# close current terminal and open a new one
$ gvm install jbake
$ jbake -help
@jstrachan
jstrachan / gist:f960917b4861f30a8a45
Last active August 29, 2015 14:02
names your iTerm2 tab after the current working directory, shows the path in the prompt and the git branch
# thanks to this gist for the iTerm2 tab naming stuff: https://gist.github.com/phette23/5270658
# can't remember where I cribbed the rest of this from!
# hacked it a bit to work on OS X
_bold=$(tput bold)
_normal=$(tput sgr0)
__vcs_dir() {
local vcs base_dir sub_dir ref
sub_dir() {
@vtanathip
vtanathip / gitignore-android-studio-list
Last active July 23, 2024 10:09
Git Ignore files list that should use in Android Studio Projects
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 5, 2024 21:40
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@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 = [email protected]: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:

@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby