Skip to content

Instantly share code, notes, and snippets.

View russianryebread's full-sized avatar

Ryan Hoshor russianryebread

View GitHub Profile
<!-- Support for Twitter's New API -->
<div id="comments">
<a class="twitter-timeline" width="100%" height="300" href="https://twitter.com/search?q=<?php echo urlencode($post_link) ?>" data-widget-id="NEW_TWITTER_WIDGET_ID" data-chrome="transparent noborders">Comments:</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>

Compiling/Installing Node 0.10.24 (and Python 2.6, required by Node) on CentOS 5

Update system packages -- will migrate system forward to CentOS 5.10. (Optional?)

$ sudo yum update

Install the EPEL Repo:

@russianryebread
russianryebread / gist:398490f3326429023a4d
Last active August 29, 2015 14:09 — forked from anonymous/gist:67659f5c5734a7dd14dc
Uninstalling Firefox installs Thunderbird?
user@lubuntubox:~$ sudo apt-get remove firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
thunderbird <----------------------- WHAT????
Suggested packages:
thunderbird-gnome-support ttf-lyx
The following packages will be REMOVED:
firefox
@russianryebread
russianryebread / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@russianryebread
russianryebread / javascript_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@russianryebread
russianryebread / css_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@russianryebread
russianryebread / InsertDate.gs
Last active August 29, 2015 14:22 — forked from thomxc/InsertDate.gs
Inserts a date at the cursor location in Google Docs
/**
* @OnlyCurrentDoc Limits the script to only accessing the current document.
*/
var now_date = new Date();
// Menu Titles
var title = [
Utilities.formatDate(now_date, "GMT", "MM/dd/yyyy"),
Utilities.formatDate(now_date, "GMT", "yyyy-MM-dd"),
@russianryebread
russianryebread / default
Created February 26, 2016 15:15 — forked from ghalusa/default
nginx default configuration file (ubuntu path: /etc/nginx/sites-available/default) with conversions of .htaccess environment variables and mod_rewrite logic, along with parameters supporting a fastcgi-based php setup
server {
listen 80;
root /var/www/YOUR_DIRECTORY;
index index.php index.html index.htm;
###################################################
# Change "yoururl.com" to your host name
server_name yoururl.com;
@russianryebread
russianryebread / install-redis.sh
Last active September 13, 2016 13:55 — forked from dstroot/install-redis.sh
Install Redis on Amazon EC2 AMI
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@russianryebread
russianryebread / redis-server
Created September 13, 2016 13:54 — forked from dstroot/redis-server
An Amazon AMI initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid