Skip to content

Instantly share code, notes, and snippets.

@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
class ShouldWrapper
def initialize(value)
@value = value
end
def ==(other)
if @value == other
puts ":)"
else
require 'jmx'
server = JMX.simple_server
client = JMX.connect
hot_spot = client["com.sun.management:type=HotSpotDiagnostic"]
hot_spot.dumpHeap "my_heap.map", true
puts "done"
exit 0
destructuring_assignment_for_named_local_args() {
declare numbers letters words
read numbers letters words <<<"$@"
echo "$numbers"
echo "$letters"
echo "$words"
}
destructuring_assignment_for_named_local_args 123 abc "Hello world"
#!/bin/sh
HOST="http://freynaud-mbp.local/~freynaud/"
JAVA_DMG="jdk-7u45-macosx-x64.dmg"
XCODE_DMG="xcode_5.0.2.dmg"
CLI_DMG="command_line_tools_os_x_mavericks_for_xcode__late_october_2013.dmg"
USER="vagrant"
check(){
if [[ $? != 0 ]] ; then
git clone https://git.chromium.org/chromium/tools/depot_tools.git
mkdir -p chromium
cd chromium
gclient config http://src.chromium.org/svn/releases/$CHROME_VERSION
cat <<EOF >.gclient
solutions = [
{ "name" : "$CHROME_VERSION",
"url" : "http://src.chromium.org/svn/releases/$CHROME_VERSION",
"deps_file" : "DEPS",
"managed" : True,
@bbrowning
bbrowning / output
Last active December 12, 2015 07:59
bbrowning@bbrowning-mbp:~$ curl -I http://localhost:8080/posts/
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: foobar=k5wDvCA2jZvAlwqb2HgFMdsX; Domain=foobar.com; Expires=Fri, 08-Feb-2013 18:17:44 GMT; Path=/baz; Secure; HttpOnly
X-UA-Compatible: IE=Edge
ETag: "903b327bb0b526d7d9b6b4d8344fc56f"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 9cac85c7ee32c524896767ff8ce730ca
X-Runtime: 0.796000
Content-Type: text/html;charset=utf-8
@rwjblue
rwjblue / readme.md
Last active May 13, 2016 18:10
Guide to using drip with JRuby

#Overview drip is an awesome command line tool that can be used to dramatically lower perceived JVM startup time. It does this by preloading an entirely new JVM process\instance and allowing you to simply use the preloaded environment. This has extraordinary results with jruby.

We reduced time to run rake environment from 13 seconds to a mere 3.5 seconds. This is actually at or near MRI 1.9.3p327 (with falcon patch) speeds!

Adding a few addition jruby options will reduce startup time even further (down to 1.69 seconds).

#Install Drip Install drip if you haven't already (see https://github.com/flatland/drip)

@funny-falcon
funny-falcon / changes.md
Last active March 23, 2024 05:53
Performace patch for ruby-1.9.3-p327

Changes:

  • this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.

@illicitonion
illicitonion / gist:4110995
Created November 19, 2012 14:40
ff36 ssl patch
Index: javascript/firefox-driver/js/files.js
===================================================================
--- javascript/firefox-driver/js/files.js (revision 17832)
+++ javascript/firefox-driver/js/files.js (working copy)
@@ -31,9 +31,7 @@
var prefix = opt_prefix || '';
var suffix = opt_suffix || '';
- var tmpdir = Components.classes['@mozilla.org/file/directory_service;1'].
- getService(Components.interfaces.nsIProperties).