Skip to content

Instantly share code, notes, and snippets.

View flexgrip's full-sized avatar

Raymond Aguilar flexgrip

View GitHub Profile
[{"nid":[{"value":"1"}],"uuid":[{"value":"2fad4156-76f0-43d3-8500-aa5420cb480a"}],"vid":[{"value":"1"}],"type":[{"target_id":"book"}],"langcode":[{"value":"en"}],"title":[{"value":"A Clockwork Orange"}],"uid":[{"target_id":"1","url":"\/user\/1"}],"status":[{"value":"1"}],"created":[{"value":"1455223069"}],"changed":[{"value":"1455223135"}],"promote":[{"value":"0"}],"sticky":[{"value":"0"}],"revision_timestamp":[{"value":"1455223124"}],"revision_uid":[{"target_id":"1","url":"\/user\/1"}],"revision_log":[],"revision_translation_affected":[{"value":"1"}],"default_langcode":[{"value":"1"}],"path":[],"body":[{"value":"<p>A Clockwork Orange takes place in a futuristic city governed by a repressive, totalitarian super-State. In this society, ordinary citizens have fallen into a passive stupor of complacency, blind to the insidious growth of a rampant, violent youth culture. The protagonist of the story is Alex, a fifteen-year-old boy who narrates in a teenage slang called nadsat, which incorporates elements of Russi
@flexgrip
flexgrip / svn-example.svg
Created June 4, 2015 17:11
What XML looks like in an SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$(document).ready(function() {
var e = new Array;
e[0] = "bastards";
e[1] = "fakes";
e[2] = "mongrels";
e[3] = "phonies";
e[4] = "shams";
e[5] = "sharks";
e[6] = "swindlers";
e[7] = "jerks";
elif request == 'registration-status':
rid = self.request.POST.get('reg_id')
reg = Registration.get_by_id(int(rid))
if not reg:
body = {'status': 'error', 'message': 'Registration failed!'}
if reg.status == 'finished':
account = reg.account.get()
plan_type = 'standard'
if account.is_pro:
plan_type = 'pro'
@flexgrip
flexgrip / functions.js
Created August 18, 2014 19:43
LeadPages Template fade-in box and facebook comments syntax
// Add this placeholder to functions.js so it can hold
// the leadpages_input_data variable.
var leadpages_input_data = {};
<ul class="lb-my-images unstyled">
<li class="default-image">
<a href="#" class="img-choose-btn">
<img src="https://d723-leadbox-redesign-dot-leadpage-test.appspot.com/static/lp702/img/leadbox-image-placeholder.png">
</a>
</li>
<li class="my-images"><a href="#" class="image-choose-btn"><img alt="Image" src="https://lh4.ggpht.com/QccS17iRxed2xgpap17IeP3qx8DshmBH-OrdGcFqxJjfprMWo6oPDk1l3KaXw3PkGCBS26QEh-PItlbqQYLLcG1t=s100"></a></li>
@flexgrip
flexgrip / services_from_drupal.js
Last active December 22, 2015 13:58
Get data from Drupal Services rest server to the Intel XDK. Yeah yeah yeah.
/*
_ _ _______ ______
| \ | | ____\ \ / / ___|
| \| | _| \ \ /\ / /\___ \
| |\ | |___ \ V V / ___) |
|_| \_|_____| \_/\_/ |____/
================================*/
function getBlog() {
// Pull the curtain
@flexgrip
flexgrip / retroand_trans.py
Created September 8, 2013 06:25
RetroAND transcoder... Brillaint
import os
import time
from multiprocessing import Event, Process, Pipe
from Queue import Queue
from retroand.config import cfg
from retroand.log import logger
def transcode_process(connection, path, stop, format='mp3', bitrate=False):
GET "LIBHDR"
LET START() = VALOF $(
FOR I = 1 TO 5 DO
WRITEF("%N! = %I4*N", I, FACT(I))
RESULTIS 0
)$
AND FACT(N) = N = 0 -> 1, N * FACT(N - 1)
@flexgrip
flexgrip / gist:5158687
Created March 14, 2013 03:51
Sharepoint selector for checkboxes
<script type="text/javascript">
/* $(document).ready(function() {
var thelist = new Array();
$('input.s4-itm-cbx').change(function() {
if(this.checked) {
checker = $(this).parent().parent().attr("iid").split(',');
thelist.push(checker[1]);
alert(thelist);
}