Skip to content

Instantly share code, notes, and snippets.

<p>
Spiegel Bestseller Platzierung
<br>
<a href="https://www.buchreport.de/bestseller/buch/isbn/9783906910000.htm/" target="_blank">
<i class="fa fa-caret-right"></i> <strong>Buchreport.de</strong>
</a>
</p>
<p>
Äußerst präzise in ihrer Eigenwahrnehmung, doch ohne je Nabelschau zu betreiben, schildert die Dreißigjährige den Prozess ihrer Häutung.
<br>
<a href="http://ondemand-mp3.dradio.de/file/dradio/2017/11/09/deborah_feldman_ueberbitten_dlf_20171109_1610_2d75854d.mp3" target="_blank"><i class="fa fa-caret-right"></i> Sigrid Brinkmann In der Sendung Büchermarkt, <b>Deutschlandfunk</b> [AUDIO] </a>
<br>
#!/usr/bin/env node
const Benchmark = require('benchmark')
const suite = new Benchmark.Suite
let a = undefined
suite
.add('human-friendly', function () { if (a) true })
.add('machine-friendly', function () { if (a !== undefined) true })
#!/usr/bin/env ruby -wKU
require "rubygems"
require "appscript"
include Appscript
chrome = app("Google Chrome")
safari = app("Safari")
chrome_tab = chrome.windows[1].active_tab
# lib/custom_logger.rb
class CustomLogger < Logger
def format_message(severity, timestamp, progname, msg)
"#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n"
end
end
logfile = File.open("#{Rails.root}/log/custom.log", 'a') # create log file
logfile.sync = true # automatically flushes data to file
CUSTOM_LOGGER = CustomLogger.new(logfile) # constant accessible anywhere
@12finger
12finger / gist:43bd2c9909b3ee244cc3
Created December 11, 2014 09:38
make turbolinks play nicely with angular
// place in app.js
// before page-change: destroy all stuff to prevent leakage
$(document).on('page:before-change', function() {
angular.element("body").scope().$broadcast("$destroy");
});
// now, on tubolinks page:load, bootstrap the ng-app fully again
$(document).on('ready page:load', function() {
angular.bootstrap(document.body, ['myFancyAppName'])
@12finger
12finger / .powenv
Last active August 29, 2015 14:07 — forked from beneggett/.powenv
# detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
# load environment of current project ruby
if
{
"folders":
[
{
"path": "/Path/To/application/dir",
"folder_exclude_patterns": ["cache", "logs"],
"file_exclude_patterns": ["*_example.*", "backup_*"],
"name": "Application Name"
},
{