UPDATE `NEXUS 5`
SET `VERSION`='5.0', `BUILD`='LRX21O', `RECOVERY`='CUSTOM', `ROOTED`=1
WHERE `VERSION`='4.4.4' && `BUILD`='KTU84P' && `RECOVERY`='CUSTOM' && `ROOTED`=1
&& `WANNA_KEEP_USERDATA`=1;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Quick rough and dirty script to push new issues of the excellent | |
# free monthly magazine from the guys at PragProg to your kindle | |
# | |
# Will download the latest magazine from the list and then will only | |
# download magazines when a new issue comes out | |
# | |
require 'date' | |
require 'fileutils' | |
require 'nokogiri' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Inspired by http://solog.co/47/10-scala-one-liners-to-impress-your-friends/ | |
-- Double everything in a list | |
map (*2) [1..10] | |
-- Sum a list of numbers | |
sum [1..1000] | |
-- Verify if exists in a string (thanks to hammar for this: http://stackoverflow.com/questions/6224315/how-to-verify-if-some-items-are-in-a-list) | |
any (`elem` ["haskell", "ghc", "monads", "cabal"]) $ words "this is a piece of example text talking about haskell and ghc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; double everything in a list | |
(map #(* 2 %) (range 1 10)) | |
; sum a list of numbers | |
(reduce + (range 1 1000)) | |
; read a file | |
(clojure.string/split (slurp "cl.clj") #"\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn group [xs] | |
"splits its sequence argument into a list of lists of equal, adjacent elements." | |
(partition-by identity xs)) | |
(defn zip [xs ys] | |
"makes a list of vector tuples, each tuple containing elements of both sequences occuring at the same position" | |
(map vector xs ys)) | |
(defn lines [str] | |
"For a given string, split it into a vector using a newline terminator as a delimiter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt { | |
echo $1 | |
read -p "Ready? " -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo | |
else | |
echo "Quitting" | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BeadSort { | |
private static final int BEAD = 1; | |
public void sort(int[] array) { | |
int[][] abacus = populateAbacusAndWipeInput(array); | |
for (int pole = 0; pole < abacus[0].length; pole++) { | |
int poleRow = abacus.length - 1; | |
for (int currentRow = poleRow; currentRow >= 0; currentRow--) { | |
if (abacus[currentRow][pole] == BEAD) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
RESET=`tput sgr0` | |
# test devised by gordonDrogon | |
function testpin { | |
pin=$1 | |
echo -n "Testing GPIO pin #$pin..." | |
gpio mode $pin in |
OlderNewer