Skip to content

Instantly share code, notes, and snippets.

View russianryebread's full-sized avatar

Ryan Hoshor russianryebread

View GitHub Profile
@russianryebread
russianryebread / index.html
Last active August 29, 2015 14:04
Bootstrap Basic Template (CDN URLs & Local Paths)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
@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 / passgen.html
Created December 15, 2014 16:01
Random Password Generator
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Generate Secure Password</title>
<script type="text/javascript">
var specials = '!@$%^&*()_+{}:<>?\|[];,./~';
var lowercase = 'abcdefghijklmnopqrstuvwxyz';
var uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var numbers = '0123456789';
@russianryebread
russianryebread / UITableViewDelegate.m
Last active August 29, 2015 14:17
Default UITableView Delegate Methods
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
#warning Potentially incomplete method implementation.
// Return the number of sections.
return 0;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
#warning Incomplete method implementation.
@russianryebread
russianryebread / getQueryVariable.js
Last active August 29, 2015 14:17
Parses the URL Query String in Javascript
function getQueryVariable(qvar) {
var query = window.location.search.substring(1);
var vars = query.split("&");
var len = vars.length;
for (var i=0;i<len;i++) {
var kv = vars[i].split("=");
if(kv[0] == qvar){return kv[1];}
}
return(false);
}
@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 / tutorial.md
Last active August 29, 2015 14:22
Automatic zone replication with BIND9 in Plesk 11.5 + Debian Wheezy + PHP

Automatic zone replication with BIND9 in Plesk 11.5 + Debian Wheezy + PHP

Written by ilijamt - Original article

This tutorial is aimed at showing how to set up zone replication from a master to a slave server, without the help of the user input on Debian Wheezy with Plesk 11.5 and PHP

Nomenclature

master
Main server, that hosts Plesk and BIND9 DNS server in Master mode