Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/sh | |
# | |
# install a local POP3 server on OSX serving the system mailbox as a POP3 account. | |
# | |
# get pre-compiled OS X binaries of UW's (University of Washington) ipop3d and imapd. | |
cd ~ | |
curl -L -O http://www.macosxguru.net/downloads/localmail.zip | |
unzip localmail.zip |
diff --git a/load.c b/load.c | |
index 0ff4b60..019ccb9 100644 | |
--- a/load.c | |
+++ b/load.c | |
@@ -18,6 +18,7 @@ VALUE ruby_dln_librefs; | |
#define IS_DLEXT(e) (strcmp((e), DLEXT) == 0) | |
#endif | |
+static int sorted_loaded_features = 1; | |
#!/usr/bin/env ruby | |
# Put this file in the root of your Rails project, | |
# then run it to output the SQL needed to change all | |
# your tables and columns to the same character set | |
# and collation. | |
# | |
# > ruby character_set_and_collation.rb | |
DATABASE = '' |
require 'rubygems' | |
require 'snmp' | |
require 'carrot' | |
require 'json' | |
q = Carrot.queue('traps', :durable => true) | |
m = SNMP::TrapListener.new(:Port => 162, :Community => 'snmpcommunity') do |manager| | |
puts "trapd.rb started..." | |
manager.on_trap_default do |trap| |
#No such file to load -- devise/confirmations_controller | |
#resque worker devise not eager loading | |
require File.expand_path('../config/application', __FILE__) | |
require 'rake/dsl_definition' | |
require 'resque/tasks' | |
Askjane::Application.load_tasks | |
task "resque:setup" => :environment do |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# = Kernel#switch | |
# Provides alternative switch-case syntax. | |
# | |
# # support methods: | |
# value = [] | |
# switch value do | |
# on empty?: -> { "none" } | |
# on one?: -> { "one" } | |
# on many?: -> { "many" } | |
# end |
#!/bin/bash | |
# Script to export Safari's reading list into a text file, then import this into Pocket or Evernote (or any service with a "email in content" feature). | |
# First take all of Safari's Reading List items and place them in a text file. | |
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' > readinglistlinksfromsafari.txt | |
# Now loop over each of those URls within that text file and add them to pocket. | |
while IFS= read -r line | |
do | |
echo $line |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
This is a companion Gist for a talk that I gave at React Berlin in April 2015. The fine folks at Bitcrowd recorded all three of the evening's talks, so you can watch mine at https://www.youtube.com/watch?v=9ArhJiMGVDc.
Peter Magenheimer (@peterjmag)
I'm a front end developer at ResearchGate. And yes, we're hiring.