This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| .toast { | |
| position: fixed; | |
| bottom: 10px; |
This file contains hidden or 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
| (function (global, factory) { | |
| if (typeof define === "function" && define.amd) { | |
| define(['exports'], factory); | |
| } else if (typeof exports !== "undefined") { | |
| factory(exports); | |
| } else { | |
| var mod = { | |
| exports: {} | |
| }; | |
| factory(mod.exports); |
This file contains hidden or 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
| Traceback (most recent call last): | |
| File "shelvetest.py", line 11, in <module> | |
| data[date] = "".join( [random.choice(string.letters[:26]) for i in xrange(315)] ) | |
| File "/usr/lib/python2.7/shelve.py", line 133, in __setitem__ | |
| self.dict[key] = f.getvalue() | |
| File "/usr/lib/python2.7/bsddb/__init__.py", line 279, in __setitem__ | |
| _DeadlockWrap(wrapF) # self.db[key] = value | |
| File "/usr/lib/python2.7/bsddb/dbutils.py", line 68, in DeadlockWrap | |
| return function(*_args, **_kwargs) | |
| File "/usr/lib/python2.7/bsddb/__init__.py", line 278, in wrapF |
This file contains hidden or 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
| <div class="container" > | |
| <div class="row"> | |
| <div class="col-md-4"> | |
| Search term | |
| <input type="text" ng-model="searchTerm" class="form-control" /> | |
| </div> | |
| <div class="col-md-3" > | |
| <select ng-model="descLimit"> | |
| <option value="10">10</option> |
This file contains hidden or 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
| #include <stdio.h> | |
| main(){ | |
| printf("Hello there!\n"); | |
| FILE *f = fopen("/tmp/file.txt", "w"); | |
| if(f == NULL){ | |
| printf("Error opening file!\n"); | |
| return 1; | |
| } |
This file contains hidden or 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
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| concat: { | |
| options: { | |
| separator: ';', | |
| }, | |
| js: { |
This file contains hidden or 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
| // Google Analytics event tracking (Report available at Content->Events in GA) | |
| function gatrack(){ | |
| var args = Array.prototype.slice.call(arguments), | |
| params = ['_trackEvent'].concat(args); | |
| if(typeof _gaq !== 'undefined') { | |
| window.setTimeout(function(){ _gaq.push(params); }, 0); | |
| } | |
| } | |
This file contains hidden or 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
| import fontforge | |
| import sys | |
| serif = "FreeSerif.ttf" | |
| gubbi = "Gubbi.ttf" | |
| navilu = "Navilu.ttf" | |
| kedage = "Kedage.ttf" | |
| s = fontforge.open(serif) | |
| s.mergeFonts(kedage) |
This file contains hidden or 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
| import os, sys | |
| import datetime, time | |
| import pynotify | |
| # Notifies with a fortune cookie every X minutes. | |
| # Usage: "python notifyme.py 10" to notify every 10 minutes | |
| def notify(count): | |
| fortune = os.popen('fortune -n 100 -s', 'r').read() | |
| time = datetime.datetime.now().strftime("%H:%M:%S") |
This file contains hidden or 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
| source_path = "/media01/me/flickr/" | |
| dest_path = "./converted" | |
| import os | |
| from pipes import quote | |
| file_list = os.listdir(source_path) | |
| for f in file_list: | |
| source_file = os.path.join(source_path, f) | |
| dest_file = os.path.join( dest_path, f ) | |
| #imagemagick resize & scaling options: http://www.imagemagick.org/Usage/resize/ |