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 records | |
import re | |
def q(db, select, where=None, joins={}, order_by=None, limit=None, debug=False): | |
""" | |
Usage examples: | |
1) q(db, "phonebook.name phonebook.number", where=["phonebook.name=:name", {"name": "Dieter"}]) | |
2) q(db, "phonebook.name, phonebook.number", where="phonebook.name='Dieter'") |
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
(defn q | |
"Queries a database by asking for a vector of namespaced keywords. Namespace = table, name = column. Snake/Kebab-cases where appropriate. Allows simple join maps, with the foreign key coming first. Allows :where, which is either a string, or a sql-vector for parameterized values [sql-expression val1 val2...], and :order-by which is a simple string, and :limit which takes an integer. | |
Example: | |
(q *db* [:customers/name :customers/address :invoice/id :invoice/date] | |
{:joins {:invoice/customerid :customers/id} | |
:where [\"customers.name like ? \" \"Max\"] | |
:order-by \"invoicd.date desc\" | |
:limit 2}) |
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
package com.emotiv.examples.AverageBandPowers; | |
import com.emotiv.Iedk.*; | |
import com.sun.jna.Pointer; | |
import com.sun.jna.ptr.*; | |
public class AverageBandPowers { | |
public static void main(String[] args) { | |
Pointer eEvent = Edk.INSTANCE.IEE_EmoEngineEventCreate(); | |
Pointer eState = Edk.INSTANCE.IEE_EmoStateCreate(); |
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
/* Shrink Genie */ | |
.genie .genie-container .genie-context .genie-image > img { | |
width: 100px; | |
height: 100px; | |
} | |
.genie .genie-container .genie-context .genie-input, .genie .genie-container .genie-context .genie-image .genie-status { | |
font-size: 12px; | |
} | |
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
@-moz-document domain('genome.klick.com') { | |
body, html { | |
font-size: 10pt; | |
/*line-height: 1.4;*/ | |
font-family: Arial,sans-serif; | |
} | |
div.dashboard-grids .grid, div.dashboard-grids input, div.dashboard-grids textarea { | |
font-family: Arial,sans-serif; |
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
@-moz-document domain('genome.klick.com') { | |
body, html { | |
font-size: 10pt; | |
/*line-height: 1.4;*/ | |
font-family: Arial,sans-serif; | |
} | |
div.dashboard-grids .grid, div.dashboard-grids input, div.dashboard-grids textarea { | |
font-family: Arial,sans-serif; |
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
// ==UserScript== | |
// @name no creepiness | |
// @namespace com.px0.klick | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
setInterval(function() { | |
jQuery('img[src$="/file/download?inline=true&GUID=79d2d216-c952-4af9-9f66-bd2a144b84b3"]').attr("src", "http://cutearoo.com/wp-content/uploads/2012/11/Puppy7.jpg"); | |
}, 2000); |