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
jTypes('struct Color', function(red, green, blue) | |
{ | |
this.red = red; | |
this.green = green; | |
this.blue = blue; | |
}, | |
{ | |
'public int red': 0, | |
'public int green': 0, | |
'public int blue': 0 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
# yolo | |
<input type="text" autofocus> | |
</body> |
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 | |
# backup "<path>" | |
# create a new folder in the backups directory and dump the current directory's contents into it | |
backup(){ | |
mkdir "/path/to/backups/$1"; | |
cp -r . "/path/to/backups/$1"; | |
} | |
# bs |
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
<html> | |
<head> | |
<style> | |
html { height: 101%; } | |
body { margin: 0; padding: 0; font-family: sans-serif;} | |
h1, h2, h3 { margin: 0; } | |
a { font-weight: ; text-decoration: none; color: #586FB2;} | |
.active { background: #586FB2; color: white;} |
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 pytohn | |
from flask import Flask, request, jsonify, abort | |
import time | |
app = Flask( __name__ ) | |
notes = {} | |
next_note_id = 0 |
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
<canvas id=c></canvas> | |
<span>Try disturbing the particles with mouse</span> |
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
( function ( window, undefined ) { | |
var Aloha = window.Aloha || ( window.Aloha = {} ); | |
Aloha.settings = { | |
logLevels: { 'error': true, 'warn': true, 'info': true, 'debug': false, 'deprecated': true }, | |
errorhandling: false, | |
ribbon: false, | |
locale: 'en', | |
floatingmenu: { | |
width: 630, |
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
/** | |
* Returns formatted time depending on the clock (e.g. 00:00 / 12:00am) | |
* @param {number} hour - The hour of the day (0-24) | |
* @param {number} minute - The minute of the the hour (0-59) | |
* @param {string} clock - Either "12h" or "24h" | |
* @returns The time as a well formated string or false in case of an error | |
*/ | |
function formatTime(hour, minute, clock) { | |
( minute < 10 ) | |
? minute = '0' + minute |
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
$(function( $ ) { | |
$(document).ready(function() { | |
$(".ajax-intercept").ajaxInterceptor({ | |
pageElementToUpdateSelector: "div#content", | |
showLoadingMessage: true, | |
loadingMessageDelay: 600, | |
loadingMessage: 'Loading...', |
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
$(function () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var content = $('#content'); | |
var input = $('#input'); | |
var status = $('#status'); | |
// my color assigned by the server | |
var myColor = false; |
OlderNewer