Skip to content

Instantly share code, notes, and snippets.

View manojlds's full-sized avatar

Manoj manojlds

View GitHub Profile
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@mvirkkunen
mvirkkunen / gist:89f61a06819530e48b53
Created May 26, 2014 17:17
Tracker-ish URLs found from "Awesome Screenshot" source code
https://chrome.google.com/webstore/detail/awesome-screenshot-captur/alelhddbbhepgpmgidjdcjakblofbmce
How many trackers does a single Chrome extension need?
Seven.
https://ssl.google-analytics.com/ (manifest.json, javascripts/cga.js)
https://cdn.extensionanalytics.com/ (manifest.json, javascripts/feedback.js)
https://pixel.getpaidfordata.com/ (manifest.json, background.html)
https://tags.crwdcntrl.net/ (manifest.json)
@roberto
roberto / _flash_messages.html.erb
Created August 13, 2012 22:47
Rails flash messages using Twitter Bootstrap
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
@terryjray
terryjray / gist:3296171
Created August 8, 2012 15:55
Enabling hstore for new postgresql 9.1 and rails 3 install on ubuntu 12.04
RAILS_ENV=production rake db:setup
# produces the error below.....hmmm.....it's a no-worky
psql:/yourprojectpath/yourproject/db/structure.sql:29: ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
# hstore postgresql extension needs to be installed, so....
sudo apt-get install postgresql-contrib
# now your extension should be available to enable so log in with psql
psql -d yourproject_production -U yourdbuser -W
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@cjoudrey
cjoudrey / twitter.js
Created November 5, 2011 16:37
Lazy-rendering in PhantomJS
// This example shows how to render pages that perform AJAX calls
// upon page load.
//
// Instead of waiting a fixed amount of time before doing the render,
// we are keeping track of every resource that is loaded.
//
// Once all resources are loaded, we wait a small amount of time
// (resourceWait) in case these resources load other resources.
//
// The page is rendered after a maximum amount of time (maxRenderTime)