Skip to content

Instantly share code, notes, and snippets.

View TexRx's full-sized avatar
🏠
Working from home

Bobbie Tables TexRx

🏠
Working from home
  • Austin, TX
View GitHub Profile
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<iframe name="ad_iframe" src="./casper_test.html" />
</body>
</html>
var casper = require("casper").create(),
viewportSizes = [
[320,480],
[320,568],
[600,1024],
[1024,768],
[1280,800],
[1440,900]
],
url = casper.cli.args[0],
@TexRx
TexRx / glyphtxt.js
Last active August 29, 2015 14:08 — forked from krawaller/glyphtxt.js
txticon = function(iconname) {
var map = {
"glass": "E001",
"leaf": "E002",
"dog": "1F415",
"user": "E004",
"girl": "1F467",
"car": "E006",
"user_add": "E007",
"user_remove": "E008",
@TexRx
TexRx / gtm_macros.js
Last active August 29, 2015 14:07 — forked from joshkehn/gtm_macros.js
/*
* Custom JS macros for creating tags in GTM that populate event information from
* element attributes.
*
* Author: Joshua Kehn <[email protected]>
* Copyright: (c) 2014 by Joshua Kehn
* License: ISC <http://www.isc.org/downloads/software-support-policy/isc-license/>
*/
function () {
/**
* simple JSONP support
*
* JSONP.get('https://api.github.com/gists/1431613', function (data) { console.log(data); });
* JSONP.get('https://api.github.com/gists/1431613', {}, function (data) { console.log(data); });
*
* gist: https://gist.github.com/gists/1431613
*/
var JSONP = (function (document) {
var requests = 0,
// copy code from http://stackoverflow.com/questions/17527870/how-does-trello-access-the-users-clipboard/17528590
(function() {
var utils = {
nodeName: function(node, name){
return !!(node.nodeName.toLowerCase() === name)
}
};
var textareaId = 'simulate-trello-clipboard'
, containerId = textareaId + '-container'

Browserify Search Request For Help

I have been working on making a search index for npm modules that work with browserify. In order to do this, obviously, for each module on npm, I need to determine whether or not it works with browserify. Easy! I thought. I will run the browserify cli tool on the module browserify node_modules/that_module, and if it exits normally, it works with browserify. So I did that, and implemented a search engine on this premise. Except that, in the search results, I found a lot of modules which, although it "passed the test", they still were useless because simple the act of loading the bundle in a browser would result in a runtime error - a lot of these were a result of the module testing for process.versions.node which doesn't exist in the browserify process shim. Okay, I thought, I'll run the resulting bundle in jsdom, genious! That did reject lots of modules, but it still wasn't good enough. I still got a lot of modules in the search inde

How to use angular.js with browserify.

To define a factory, service, controller or a directive, use the following format:

exports.inject = function(app) {
    app.factory('MyFactory', exports.factory);
    return exports.factory;
}
Enable-RemoteDesktop
cinst ccleaner
cinst console-devel
cinst expresso
cinst fiddler4
cinst filezilla
cinst firefox
cinst git-credential-winstore
cinst irfanview
@TexRx
TexRx / .tmux.conf
Created April 30, 2014 07:03 — forked from paulrouget/.tmux.conf
tmux configuration example
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# THEME
set -g status-bg black