View gitconfig
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
l = log --oneline --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
View mac-deals-scrapper.clj
(ns mac-deals-checker.core
(:require [reaver :refer [parse extract-from text]]))
(def deal-url "")
(defn latest-deals-info
(-> deal-url slurp parse (extract-from ".product" [:spec :price] "td.specs" text "span.current_price span span" text)))
View gist:c4f793e953f7d8623acb
var safeImageURI = function(s) { return encodeURI(s).replace(/\-/g, "%2D").replace(/\_/g, "%5F").replace(/\./g, "%2E").replace(/\!/g, "%21").replace(/\~/g, "%7E").replace(/\*/g, "%2A").replace(/\'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29"); }
View gist:6208758
This is all you need to know about Clojure’s namespace declarations:
(ns my-project.core
; :require Clojure libs
(:require clojure.core.async
[compojure.core :refer [POST routes]]
[compojure.handler :refer :all]
[ring.adapter.jetty :as jetty]
[clojure.edn :as edn :refer [read]])
; :import for Java classes
View gist:5972209
co = checkout
br = branch
ci = commit
st = status
last = log -1 HEAD
visual = !gitk
l = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
View haze-api.clj
(ns haze-api.core
(:require [net.cgrand.enlive-html :as html])
(def doe-url "")
(defn rows-by-enlive
(let [site (html/html-resource ( url))
rows (html/select site [:table.table1 :tr])]
View haze-api.groovy
import org.jsoup.*
String URL = ""
def doc = Jsoup.connect(URL).get();
def result ="table.table1 tr");
result.each { tr ->
def row ="td")
println " ---- row---\n" + row[0].text() + " " + row[1].text()
View gcm-clojure.clj
;;; Project here:
;;; Note: you need to specify the custom repo to get gcm-server.jar
;;; :repositories [["google" ""]]
;;; :dependencies [[ "1.0.2"]]
;;; See
;; Import all the needed classes from gcm-server.jar
(import ( Sender Message Message$Builder MulticastResult))
View AndroidManifestDecompressor.groovy
class AndroidXMLDecompress {
// decompressXML -- Parse the 'compressed' binary form of Android XML docs
// such as for AndroidManifest.xml in .apk files
View IrcClient.scala
import scala.util.control.Breaks._
val server = "";
val nick = "SeymourCakes"
val login = "SeymourCakesBot"
val channel = "#myoss"
val socket = new Socket(server, 6667)