Skip to content

Instantly share code, notes, and snippets.

@selaromi
selaromi / make-flashlight-work-on.yosemite.md
Last active July 25, 2023 19:21
Steps to make Flashlight work on 10.10.4 (doesn't work for El Capitan)

Make Flashlight work on 10.10.4

  1. Install SIMBL http://culater.net/software/SIMBL/SIMBL.php
  2. Copy SpotlightSIMBL.bundle to /Library/Application Support/SIMBL/Plugins/ (a)
  3. Copy Flashlight.osax to ~/Library/ScriptingAdditions/ (b)
  4. Disable Flashlight
  5. Enable Flashlight
  6. Open Script Editor on your Mac (look for "Script Editor In Spotlight") and paste the following code (don't change Snow Leopard for Yosemite)
tell application "Spotlight" to inject SIMBL into Snow Leopard
@selaromi
selaromi / rails-postgres-wercker-database_url.md
Last active June 26, 2017 08:27
wercker.yml for Rails with Postgresql and DATABASE_URL (docker stack)

RAILS & POSTGRES WITH WERCKER AND DATABASE_URL

Basically, if you prefer to use DATABASE_URL in your application better than creating the whole database.yml thing, set the following ENV variable in your wercker app settings:

  • APP_POSTGRES_PASSWORD (required)
  • APP_POSTGRES_USER (optional)
  • APP_POSTGRES_DB (optional)
  • DATABASE_URL (value below)

name: DATABASE_URL

@selaromi
selaromi / gist:e6f253d739bb31c95853
Created February 22, 2015 10:51
SHA256 in Java Ruby C# PHP Phython
*SHA256–Bit Hash Java Example*
import java.security.MessageDigest;
import java.security.SignatureException;
String sourceString = ...; // shared secret + fields in correct format
String hash = sha256Digest(sourceString);
public String sha256Digest (String data) throws SignatureException {
return getDigest(“SHA-256”, data, true);
}