This file contains hidden or 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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/ | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or 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
| >> IF = -> b { b } | |
| => #<Proc:0x007fb4e4049cc8 (lambda)> | |
| >> LEFT = -> p { p[-> x { -> y { x } } ] } | |
| => #<Proc:0x007fb4e403d680 (lambda)> | |
| >> RIGHT = -> p { p[-> x { -> y { y } } ] } | |
| => #<Proc:0x007fb4e4028ff0 (lambda)> | |
| >> IS_EMPTY = LEFT |
This file contains hidden or 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 ObjectDiagnostics | |
| extend self | |
| #This is handy when you want to determine what types of objects are contributing to memory bloat | |
| #returns the change in object counts since the last time this method was called | |
| def change_in_object_counts | |
| #this will start all counts at 0 for the initial run | |
| @previous_counts ||= Hash.new(0) |
This file contains hidden or 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
| # | |
| # Concept from https://gist.github.com/1205828 | |
| # | |
| module ApplicationHelper | |
| class FoundationLinkRenderer < ::WillPaginate::ActionView::LinkRenderer | |
| protected | |
| def html_container(html) | |
| tag(:ul, html, container_attributes) | |
| end |
This file contains hidden or 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
| (function( $ ) { | |
| $.fn.simulateDragDrop = function(options) { | |
| return this.each(function() { | |
| new $.simulateDragDrop(this, options); | |
| }); | |
| }; | |
| $.simulateDragDrop = function(elem, options) { | |
| this.options = options; | |
| this.simulateEvent(elem, options); | |
| }; |
This file contains hidden or 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
| title: Random | |
| %p#somepara | |
| Paragraph with a link to [[http://www.google.com.au|Google]]. | |
| %p | |
| Paragraph with link to [[{{ url_for('index') }}|index]]. | |
| %pre.python | |
| from flask import Flask |
This file contains hidden or 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
| # Download Sublime Text 2 from http://www.sublimetext.com/2 | |
| # If you aren't root, sudo su | |
| tar -xvjf Sublime\ Text\ 2*.tar.bz2 | |
| mv Sublime\ Text\ 2/ /opt/sublime-text-2/ | |
| ln -s /opt/sublime-text-2 /usr/local/sublime-text-2 | |
| ln -s /usr/local/sublime-text-2/sublime_text /usr/local/bin/sublime_text | |
| rm Sublime\ Text\ 2*.tar.bz2 | |
| # Sublime Text 2 can now be run as normal user with command "sublime_text" |
This file contains hidden or 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
| # Usage: redis-cli publish message hello | |
| require 'sinatra' | |
| require 'redis' | |
| conns = [] | |
| get '/' do | |
| erb :index | |
| end |
This file contains hidden or 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
| from flask import Blueprint | |
| import converters # module containing the custom converter classes | |
| def add_app_url_map_converter(self, func, name=None): | |
| """ | |
| Register a custom URL map converters, available application wide. | |
| :param name: the optional name of the filter, otherwise the function name | |
| will be used. | |
| """ |
This file contains hidden or 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
| vendor/ | |
| .bundle/ | |
| node_modules/ | |
| Gemfile.lock |