Skip to content

Instantly share code, notes, and snippets.

View retornam's full-sized avatar
🎯
Focusing

retornam retornam

🎯
Focusing
View GitHub Profile
@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 / 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 / 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

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:

# -*- 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:
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
@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
(-> "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"]