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
'use strict'; | |
// To be used with jscodeshift: https://github.com/facebook/jscodeshift | |
export default function transformer(file, api) { | |
const j = api.jscodeshift; | |
if (!file.source.includes('graphql`')) { | |
return; | |
} |
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
from __future__ import print_function | |
import sys | |
import re | |
import fileinput | |
in_graphql = False | |
for line in fileinput.input(inplace=1): | |
if '`' in line and not re.search('`.*`', line): | |
in_graphql = not in_graphql | |
if in_graphql: |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jan Kassens <jan@kassens.net> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function () { | |
console.log(document.querySelectorAll('div:nth-child(6) img')); | |
console.log(document.querySelectorAll('div:nth-child(6) img')); | |
console.log(document.querySelectorAll('div:nth-child(6) img')); | |
} | |
</script> |
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
#import <Foundation/Foundation.h> | |
@interface Settings : NSObject { | |
NSString *email; | |
NSString *password; | |
NSString *server; | |
BOOL pushesMentions; | |
BOOL pushesBroadcasts; | |
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(write, wrapper, slice, fragment){ | |
document.write = function(){ | |
var id = 'document_write' + $time().toString(36); | |
var html = slice.call(arguments).join(''); | |
write.call(document, '<span id="' + id + '"></span>'); | |
window.addEvent('domready', function(){ | |
Array.filter(wrapper.set('html', html).childNodes, document.write.filter).each(function(node){ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<class name="Request.JSON"> | |
<description>Wrapped Request with automated sending and receiving of JavaScript Objects in JSON Format.</description> | |
<extends>Request</extends> | |
<syntax>var myJSONRemote = new Request.JSON([options]);</syntax> | |
<arguments> | |
<argument name="options" type="object" optional="true">See below.</argument> | |
</arguments> | |
<options> | |
<option name="secure" type="boolean" default="true"> |
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
/* | |
http://www.JSON.org/json2.js | |
2008-11-19 | |
Public Domain. | |
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
See http://www.JSON.org/js.html |
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
/* | |
* Author: Jan Kassens | |
* | |
* Guess the results and run it in Firebug | |
* If you got all right with the first try you're a JS Samurai (Ninja is overused) | |
*/ | |
var tasks = { | |
'try/finally': function(){ |
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
require 'rubygems' | |
require 'maruku' | |
unless Enumerable.instance_methods.include? "group_by" then | |
module Enumerable | |
def group_by(&blck) | |
result = Hash.new; | |
each do |x| | |
k = yield x | |
result[k] ||= []; |