Skip to content

Instantly share code, notes, and snippets.

View retornam's full-sized avatar
🎯
Focusing

retornam retornam

🎯
Focusing
View GitHub Profile
(-> "http://clojure-log.n01se.net/" java.net.URL. html-resource
(select {[:#main [:p (has [:b])]] [:#main [:p (right (has [:b]))]]})
(let-select [[nick] [:b]
says [:p :> (but-node #{whitespace :b [:a first-of-type]})]]
[(text nick) (apply str (texts says))]))
(comment Sample output
(["bradbeveridge: " "is Java's ZipInputStream really slow, or am I using it wrong?\n clojurebot: pastebin?\n"]
["clojurebot: " "excusez-moi\n"]
["bradbeveridge: " "http://clojure.pastebin.com/zR9di5K0"]
@retornam
retornam / locales.sh
Created October 26, 2012 21:04 — forked from m8ttyB/locales.sh
for testing the stub installer (curling ftw)
#!/bin/bash
locales=(en-US ach af ak ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en-GB en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko ku lg lij lt lv mai mk ml mn mr nb-NO nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE sw ta ta-LK te th tr uk vi zh-CN zh-TW zu)
#products=(firefox-beta-stub firefox-aurora-latest firefox-beta-latest firefox-nightly-latest)
products=(firefox-16.0.2 firefox-16.0.2-TESTING)
#locales=(en-US fr de lg)
platforms=(win linux linux64 osx)
for product in "${products[@]}"
do
0. SSH to server
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart
# -*- coding: utf-8 -*-
import sys
import os
import base64
import bcrypt
from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
class Blockout:

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 = git@github.com: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:

@retornam
retornam / flash.sh
Last active August 29, 2015 14:02 — forked from davehunt/flash.sh
#!/bin/bash -e
# This script is maintained at:
# https://gist.github.com/davehunt/7646076
# adb root, then remount and stop b2g
function adb_root_remount() {
echo -e "\n\033[1mRoot and remount\033[0m"
adb root
adb wait-for-device
@retornam
retornam / System Design.md
Created April 20, 2016 16:53 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@retornam
retornam / README.md
Created December 8, 2016 00:50 — forked from sehrgut/README.md
AdBlock Plus rule to neuter Forbes "AdBlock detection"

Forbes Is Irrelevant

an AdBlock Plus filter list

Installation

  1. Right-click the "ABP" icon in yoru browser toolbar.
  2. Select "Options".
  3. Click the "Add Filter Subscription" button.
  4. Select "Add a different subscription..." from the drop-down menu.
  5. Enter "Forbes Is Irrelevant" for the subscription title, and http://bit.ly/forbes-sucks for the filter list location.
  6. Click the "Add" button.
@retornam
retornam / country-bounding-boxes.py
Created November 16, 2017 20:45 — forked from graydon/country-bounding-boxes.py
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@retornam
retornam / Jenkinsfile.groovy
Created January 17, 2018 19:26 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'No quotes in single backticks'
sh 'echo $BUILD_NUMBER'
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"'
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"'
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"'
echo 'Using three backslashes still results in preserving the single quotes'