Skip to content

Instantly share code, notes, and snippets.

@changemewtf
changemewtf / it_wont_work.md
Last active August 29, 2015 13:57
What to do when it doesn't work

"It's not working!"

  1. Read the ERRORS
  2. Read the LOGS
  3. Output related info with puts and PRINT
  4. Read the DOCS
  5. Ask an EXPERT

Follow this process every time!

@warpech
warpech / jQuery.md
Last active December 26, 2024 14:26
Web Components from the perspective of a jQuery developer

Web Components as successor to jQuery

This article is a homage to jQuery - a library that once was a great boost for the productiveness of thousands of web developers around the world. In the upcoming times, the benefit of using it will drop as web developers start to switch to the web standards, including Web Components.

Status quo

As of early 2014, current state of interactive web development heavily relies on established web standards - HTML, CSS and JavaScript, all of which have been subject to consistent iterative improvement during the last few years, with the support of all major web browser vendors.

As a report shows, 57.8% of all websites use JavaScript, of which stunning 93.2% use the jQuery library to enhance the development (source). There is a long tail of other libraries and micro frameworks that are being used instead, or in compliment to jQuery, but none of them has gotten close to the popularity of t

@jamesyang124
jamesyang124 / ruby_meta.md
Last active February 21, 2025 22:26
Ruby meta programming

#!/bin/ruby --verion => 2.0.0-p353

Self

In Ruby, self is a special variable that always references the current object.

  • Inside class or module definition, self refer to the Class or Module object.
  • Inside instance method, self refer to future instance object.
  • Inside class method, self refer to the class.i
@phlco
phlco / manual_installfest.md
Last active August 29, 2015 13:56
manual installfest

Installing Tools

  1. Install [HipChat][hipchat]
  • [Upgrade to OS X Mavericks][osx]
  • Install [Google Chrome][chrome]
  • Check to make sure you don't have RVM or Macports by running this command from your terminal
    • bash <(curl -s https://gist.github.com/phlco/8358292/raw/b6e4df4efc7b7973cb5566e89c57672380062074/uninstalls.sh)ds
  • [Install Homebrew][brew] (The command is at the bottom of the page) * Type: brew doctor and resolve any warnings or errors that come up before moving on.
    • Then: brew install git rbenv ruby-build rbenv-gem-rehash postgres
@phlco
phlco / install.md
Last active August 29, 2015 13:56
installfest

InstallFest!

This is an automated version of our installfest.

Please paste the following into your terminal prompt

bash <(curl -sL http://j.mp/NplF2o)
@jvns
jvns / interview-questions.md
Last active April 17, 2025 16:25
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = '[email protected]'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@scotthmurray
scotthmurray / DataJournalismJobs.md
Last active July 13, 2019 18:19
Ideas for where to post and publicize open data journalism positions

Where to Post your Data Journalism Jobs

Update: This has moved. An updated and maintained version is here: http://alignedleft.com/resources/data-vis-jobs

I posed this question on Twitter:

If you wanted to hire a “data journalist” to support an existing reporting team with data parsing + vis, how would you find that person?

I've documented the responses here. Basically, there seems to be only one job site specifically for data journalists (so far!), and several others, depending on which audience you want to reach (e.g., more focused on development, data vis, or journalism).

@jameslafa
jameslafa / admin-projects.rb
Created July 17, 2013 10:28
Paperclip with Rails4 and active admin
ActiveAdmin.register Project do
# Don't forget to add the image attribute (here thumbnails) to permitted_params
controller do
def permitted_params
params.permit project: [:title, :summary, :description, :thumbnail, :date, :url, :client_list, :technology_list, :type_list]
end
end
form do |f|