🏳️🌈
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shotAccessControl = (userId, selector, customer)-> | |
if current_user = Meteor.users.findOne userId | |
if customer and (current_user.role is 'admin' or (current_user.customers and customer in current_user.customers)) | |
customer = Customers.findOne(customer) | |
not customer.deleted if customer | |
shotSelector = (selector, customer)-> | |
$and: [ | |
$and:[ | |
(completed: true), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
checkout_path=$(mktemp -d -t meteor) | |
git clone -b auth git://github.com/meteor/meteor.git $checkout_path | |
export PREFIX=/usr/local/lib | |
$checkout_path/install.sh && ln -fs $PREFIX/meteor/bin/meteor /usr/local/bin/ && rm -rf $checkout_path | |
if [[ $? == 0 ]]; then | |
echo $(meteor --version) successfully installed | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Reconnect Script for crappy USB UMTS routers | |
# Author: Leonhardt Wille <github.com/lwille> | |
host="www.google.de" | |
app="<Application Name>" | |
ping="/sbin/ping" | |
retry_after=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Internal tool script for easy creation of unprivileged CouchDB Users via a simple CLI | |
# prerequisites: | |
# npm install coffee prompt cradle | |
# | |
# invocation: coffee useradd.coffee | |
prompt = require 'prompt' | |
crypto = require 'crypto' | |
cradle = require 'cradle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Den folgenden Text (die letzte Zeile, beginnend mit "javascript:" als Link in der Lesezeichenleiste anlegen | |
** oder einfach bei geöffneter Game-Seite (freetime/activities/view) oben in die Adresszeile kopieren. | |
** | |
** ACHTUNG: Das Bookmarklet funktioniert nur auf einer von Dir erstellten Game-Seite. | |
** Nach dem Eingeben der User-ID sollte, wenn alles klappt, die Seite neu geladen werden. Getestet in Google Chrome für Mac. | |
** Die User-ID bekommst Du übrigens, wenn Du auf einen Avatar klickst und Dir die Nummer aus der Adresszeile kopierst. | |
*/ | |
javascript: (function(){ var uri = /http:\/\/fliplife.com\/freetime\/activities\/(\d+)\/view/; if (document.URL.match(uri)) { Webgame.Xhr.post({ url: "http://fliplife.com/freetime/activities/" + document.URL.match(uri)[1] + "/invite?userId=" + prompt("User ID? (http://fliplife.com/home/[638725252] => 638725252 eingeben"), handleAs: "json", load: function(g) { window.location.reload(); } }); } else { alert("Du musst zunächst ein Spiel eröffnen."); } })() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
host="yourhost.de" | |
port="3344" | |
user="root" | |
bold="\033[1;30m" | |
reset="\033[0m" | |
echo "Please follow the instructions:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:a=document.getElementsByClassName('like_link');for(var i=0;i<a.length;i++){a[i].firstChild.innerHTML="Sehr, sehr geil!"};a=document.getElementsByClassName('like_box');for(var i=0;i<a.length;i++){if(a[i].firstChild && a[i].firstChild.firstChild && a[i].firstChild.firstChild.nextSibling){var b=a[i].firstChild.firstChild.nextSibling;b.innerHTML=b.innerHTML.replace(/anderen/g,"andere").replace(/gefällt das/,"finden das sehr geil").replace(/Dir/,"Du");}}return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SQLGrowler | |
class Subscriber < ActiveRecord::Railties::Subscriber | |
attr :prev_subscriber | |
def initialize prev | |
@prev_subscriber = prev | |
@g = Growl.new("localhost", "ruby-growl", ["ruby-growl Notification"], ["ruby-growl Notification"], nil) | |
end | |
def sql(event) | |
super | |
@g.notify('ruby-growl Notification',Rails.application.root.split().last.to_s.capitalize,'%s (%.1fms) %s' % [event.payload[:name], event.duration, event.payload[:sql].squeeze(' ')],1,true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
# Mixin for tree generation based on a nested set, just place this in your application_helper.rb | |
module TreeMethods | |
attr_accessor :child_nodes | |
attr_accessor :parent_node | |
def after_initialize | |
@child_nodes = [] | |
@parent_node = nil | |
end | |
def recursive_tree nodes=nil, level=0 |
NewerOlder