Skip to content

Instantly share code, notes, and snippets.

@andreaseger
andreaseger / Gemfile
Created January 21, 2013 14:22
bundler provides gems not matching the current platform
# A sample Gemfile
source "https://rubygems.org"
gem "jrb-libsvm", git: 'git://github.com/sch1zo/jrb-libsvm.git',
require: 'libsvm', platforms: :jruby
gem "rb-libsvm", git: 'git://github.com/sch1zo/rb-libsvm.git', branch: 'custom_stuff',
require: 'libsvm', platforms: :ruby
@andreaseger
andreaseger / Gemfile
Last active December 11, 2015 11:38
Bundler.setup / bundle exec ignores platform
# A sample Gemfile
source "https://rubygems.org"
gem "jrb-libsvm", git: 'git://github.com/sch1zo/jrb-libsvm.git',
require: 'libsvm', platforms: :jruby
gem "rb-libsvm", git: 'git://github.com/sch1zo/rb-libsvm.git', branch: 'custom_stuff',
require: 'libsvm', platforms: :ruby
@andreaseger
andreaseger / rdio.log
Created March 26, 2013 19:03
snippet from rdio.log showing crash
2013-03-26 19:42:00.8096:INFO:Rdio.Wildcard.UI.MainPresenter:Application started:
2013-03-26 19:42:00.9096:INFO:Rdio.Wildcard.UI.MainPresenter:Initialized version 1.12.0.0:
2013-03-26 19:42:01.1456:INFO:Rdio.Wildcard.UI.Wpf.WebView:Init: 25.0.1364.152, r1123:
2013-03-26 19:42:01.5977:WARN:Rdio.Wildcard.UI.Wpf.WebView:EvaluateScript:System.InvalidOperationException: Browser is not initialized
at CefSharp.BrowserCore.CheckBrowserInitialization()
at CefSharp.Wpf.WebView.EvaluateScript(String script, TimeSpan timeout)
at Rdio.Wildcard.UI.Wpf.WebView.Evaluate[T](String script, T fallback)
2013-03-26 19:42:01.6077:WARN:Rdio.Wildcard.UI.Wpf.WebView:EvaluateScript:System.InvalidOperationException: Browser is not initialized
at CefSharp.BrowserCore.CheckBrowserInitialization()
at CefSharp.Wpf.WebView.EvaluateScript(String script, TimeSpan timeout)
@andreaseger
andreaseger / aur.sh
Last active September 13, 2016 07:40
prepares and installs an archlinux installation with btrfs on dm_crypt with gnome and one user. Partionining has to be done beforehand
#!/bin/bash
TMP_DIR=/opt/tmp
cd $TMP_DIR
tar -xvzf $1.tar.gz
cd $1
makepkg --asroot -si
@andreaseger
andreaseger / gist:5992883
Created July 14, 2013 01:49
Asus UL80vt Brightness workaround
#!/bin/sh
# /etc/acpi/actions/backlight
#acpi_fakekey $KEY_BRIGHTNESSDOWN
# added per http://forum.notebookreview.com/showpost.php?p=5665108&postcount=1235
#brightness=`echo $3 | sed 's/0000002//'`
#setpci -s 00:02.0 F4.B=${brightness}f
# added per mailing-list post
@andreaseger
andreaseger / rss-search.rb
Last active December 20, 2015 06:19
very simple rss fetcher to search for items
#!/bin/env ruby
require 'open-uri'
require 'rss'
require 'pry'
class Feedly
attr_accessor :url, :store
def initialize url
@url = url
// uses underscore.js stuff
E.Helpers.Html = {
equalHeights: function($el, minHeight, maxHeight) {
var heights,targetHeight;
heights = jQuery($el).map(function(){return jQuery(this).height();});
heights.push(minHeight);
targetHeight = maxHeight ? _.min([maxHeight, _.max(heights)]) : _.max(heights);
@andreaseger
andreaseger / deploy.rb
Last active December 21, 2015 16:49
rails deploy w/ rvm, bundler, unicorn
# Automatically precompile assets
load "deploy/assets"
# Execute "bundle install" after deploy, but only when really needed
require "bundler/capistrano"
# Application name
set :application, "page"
# Application environment
@andreaseger
andreaseger / .gitignore
Last active January 2, 2016 05:29
download episodes from elixirsips.com - subscription required
sips/*
rss.xml
.bundle
auth.rb
@andreaseger
andreaseger / .gitignore
Last active January 2, 2016 05:29
download images of one piece manga chapter from kissmanga
chapters