Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
using namespace std;
int main() {
int total = 11;
while(total--) {
if(total == 0) {
cerr << "Unable to divide by zero\n";
} else {
function decodeHtmlElements(string) {
var htmlText = document.createElement("DIV");
MSApp.execUnsafeLocalFunction(function () {
htmlText.innerHTML = string;
});
return htmlText.textContent || htmlText.innerText || "";
}
@icecreammatt
icecreammatt / error_log.sh
Created March 3, 2013 20:23
Script that lets the error log stream as new items are added to it.
sudo tail -f /var/log/apache2/error.log
@icecreammatt
icecreammatt / like-button.js
Created March 3, 2013 20:16
Like button example
<div class="fb-like" data-href="http://example.com/" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true"></div>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true // parse XFBML tags on this page?
});
import os.path as path
import string
import argparse
import glob
import re
def basename(filename):
base = filename
if filename.find('@2x') > 0:
base = filename[:filename.find('@2x')]