The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| (import '(java.awt Point Graphics Frame) '(java.awt.geom AffineTransform)) | |
| (def minpoint (doto (Point.) (.setLocation 0 0))) | |
| (def maxpoint (doto (Point.) (.setLocation 1000 1000))) | |
| (defn draw [pts #^Frame w] | |
| (doseq [[x y] pts] (.fillRect (.getGraphics w) x y 1 1))) | |
| (let [w (doto (Frame. "Bitmap") (.setSize 600 700) (.setVisible true))] ()) |
| #!/bin/dash | |
| logdir=~/logs | |
| log=$logdir/changelog | |
| echo '\n' >> $log | |
| date >> $log | |
| nano $log |
| # Looks for pattern PATTERN in file input.tex. | |
| # Returns an empty-line delimited block of text surrounding the pattern. | |
| awk | |
| -v "pattern=PATTERN" | |
| -v "bold=$(tput bold)" | |
| -v "sgr0=$(tput sgr0)" | |
| -v RS= | |
| -v 'ORS=\n\n' |
| #!/usr/bin/env perl | |
| use v5.10; | |
| use warnings FATAL => "all"; | |
| use Dancer; | |
| use URI::Escape qw(uri_escape_utf8); | |
| # This is all the search engine does | |
| get '/search' => sub { | |
| given (param("q")) { | |
| when (/^(?:!(?:ducky)?\s+|\\)(.*)/) { redirect 'http://www.google.com/search?btnI=1&q=' . uri_escape_utf8 $1 } |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| ##################################################################### | |
| # | |
| # Author: Max Suica | |
| # | |
| # License: CC-BY-SA | |
| # | |
| # Description: This is some ruby code that will allow a Rasberry Pi | |
| # to make coffee after receiving a command from Siri. | |
| # | |
| # Dependencies: |
| --- Coffeebot/raspberry-devbox (master) vagrant up | |
| [nox] Importing base box 'precise64'... | |
| [nox] The guest additions on this VM do not match the install version of | |
| VirtualBox! This may cause things such as forwarded ports, shared | |
| folders, and more to not work properly. If any of those things fail on | |
| this machine, please update the guest additions and repackage the | |
| box. | |
| Guest Additions Version: 4.2.0 | |
| VirtualBox Version: 4.1.18 |
| #!/bin/bash | |
| # usage: myfind [-d DIR] STRING [...] | |
| # finds all files matching any given STRING in DIR, or the current working | |
| # directory if DIR is not provided | |
| arg=. | |
| args=. | |
| dir=. |
| #!/bin/sh | |
| if [ $# -ne 1 ]; then | |
| echo "usage: $0 [raspbian image]" | |
| exit 1 | |
| elif [ ! -f $1 ]; then | |
| echo "Error: File $1 not found." >&2 | |
| exit 1 | |
| fi |