This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This is bad for business: --> | |
<p style="margin: 15px;"> | |
<strong style="color: #f00;">This is important!</strong> | |
<span style="color #ccc;">This isn't.</span> | |
</p> | |
<!-- Instead, define a class with a semantic, descriptive name, and style it in an external stylesheet: --> | |
<!-- in <head>: --> | |
<link rel="stylesheet" href="style.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gksudo iwlist wlan0 scan | |
zenity --info --title="WiFi Scan" --text="WiFi scan complete!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
setopt NULL_GLOB EXTENDED_GLOB | |
# Files older than this will be deleted | |
KEEP_DAYS=30 | |
files=($PWD/*(.Nmd+$KEEP_DAYS)) | |
for f in $files; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery Transition Callbacks Module | |
* by Mike Green <mike@fifthroomcreative.com> | |
*/ | |
/* jshint esnext: true, globalstrict: true, browser: true */ | |
'use strict'; | |
import $ from 'jquery'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict' | |
function collatz(num) { | |
var result; | |
if (num % 2 === 0) { | |
result = num / 2; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[11pt]{article} | |
\usepackage{graphicx} % needed for including graphics e.g. EPS, PS | |
\topmargin -1.5cm % read Lamport p.163 | |
\oddsidemargin -0.04cm % read Lamport p.163 | |
\evensidemargin -0.04cm % same as oddsidemargin but for left-hand pages | |
\textwidth 16.59cm | |
\textheight 21.94cm | |
%\pagestyle{empty} % Uncomment if don't want page numbers | |
\parskip 7.2pt % sets spacing between paragraphs | |
%\renewcommand{\baselinestretch}{1.5} % Uncomment for 1.5 spacing between lines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$result = mysql_query("SELECT * FROM table ORDER BY column DESC"); | |
// I hard-code the column names so I can capitalize, add spaces, etc. | |
$fields = '"User ID","Name","Email","Registration Date"'."\n"; | |
// Iterate through the rows of data | |
while ($row = mysql_fetch_assoc($result)) | |
{ | |
$fields .= '"'.$row['id'].'","'.$row['name'].'","'.$row['email'].'","'.$row['registration_date'].'"'."\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'optparse' | |
app = Hash.new | |
options = OptionParser.new do |opts| | |
opts.on("-o", "--option [ARG]", "Option description") do |opt| | |
app['option'] = opt | |
end | |
end | |