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
javascript: | |
/* Build URI endpoint for Khan API */ | |
var url="/api/v1/user/exercises/"+userExercise.exercise+"/problems/"+(userExercise.total_done+1)+"/attempt"; | |
/* Slowly, but surely, collecting the data for a successfull API call */ | |
var data={ | |
complete:1, | |
count_hints:0, | |
time_taken:Math.floor(Math.random()*10), | |
attempt_number:userExercise.total_done+1, |
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
DECLARE | |
amount ALIAS FOR $1; | |
r_lat FLOAT; | |
r_lon FLOAT; | |
BEGIN | |
FOR v_Count IN 1..amount LOOP | |
r_lat := random()*360; | |
r_lon := random()*360; | |
INSERT INTO points (name_of_place,location) VALUES ( 'place_'||v_Count, makepoint( r_lat, r_lon) ); | |
END LOOP; |
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
<?php | |
# Configure | |
$DB_USER = 'admin'; | |
$DB_PASS = 'qwerty'; | |
$DB_HOST = 'localhost'; | |
$DB_NAME = 'postgis-2-0'; | |
// Param 3 when ran in shell will override this value | |
$DB_TABLE = 'public.florida_establishments_garman'; | |
// Param 2 when ran in shell will override this value | |
$CATEGORY = 'misc'; |
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
# | |
# vendor/plugins/redmine_wiki_html_util/init.rb | |
# | |
require 'redmine' | |
require 'open-uri' | |
Redmine::Plugin.register :redmine_gist do | |
name 'Redmine Wiki HTML Util' | |
author 'Arlo Carreon' | |
author_url 'http://www.arlocarreon.com/' |
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
-- | |
-- subpub.lua | |
-- | |
-- Created by Arlo Carreon on 2011-06-29. | |
-- MIT License: 2011 Corillo Apps. | |
-- | |
-- SUBPUB.lua : A hub for application events. Class can publish an event, | |
-- all methods subscribed to said event will be executed. | |
-- | |
-- Try out the test below!! |
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
// JSON detection | |
var JSON = JSON || {}; | |
// implement JSON.stringify serialization | |
JSON.stringify = JSON.stringify || function (obj) { | |
var t = typeof (obj); | |
if (t != "object" || obj === null) { | |
// simple data type | |
if (t == "string") obj = '"'+obj+'"'; | |
return String(obj); |
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
<!-- // Include their JS service --> | |
<script src="http://www.websnapr.com/js/websnapr.js"></script> | |
<script> | |
// Use this function instead of wsr_snapshot() | |
function wsr_snapshot2(url,key,size,link){ | |
link=typeof(link)!='undefined'?link:1; | |
if(size==''||size==undefined){size='s'}; | |
var src="http://images.websnapr.com/?size="+(size.toLowerCase()=='t' || '' ?'t':'s')+ | |
"&key="+encodeURIComponent(key)+ |
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
<style> | |
td {text-align:center} | |
</style> | |
<table> | |
<tbody> | |
<tr> | |
<th>Category ID</th> | |
<th>Sub Category</th> | |
<th>Category</th> | |
<th>Type</th> |
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
<!--- Check for the param ---> | |
<cfparam name="FORM.signed_request" default=""> | |
<!--- Split the param by the . ---> | |
<cfset raw_str = ListGetAt(FORM.signed_request, 2, ".")> | |
<!--- Add padding if string is too short. ---> | |
<!--- CF Fix: Exception invalid base64 string ---> | |
<cfset res = Len(raw_str) % 4> | |
<cfif res eq 2> |
NewerOlder