Skip to content

Instantly share code, notes, and snippets.

@timelf123
timelf123 / on-jsx.markdown
Created January 4, 2016 02:26 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'

@timelf123
timelf123 / introrx.md
Created January 4, 2016 02:26 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
#!/bin/bash
# This little hack-job will grab credentials from a running openvpn process in Linux
# Keep in mind this won't work if the user used the --auth-nocache flag
grep rw-p /proc/$1/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $1 -ex "dump memory $1-$start-$stop.dump 0x$start 0x$stop"; done
echo "Your credentials should be listed below as username/password"
strings *.dump | grep -B2 KnOQ | grep -v KnOQ
rm *.dump --force
@timelf123
timelf123 / clone-all-twitter-github-repos.sh
Created December 23, 2015 17:23 — forked from caniszczyk/clone-all-twitter-github-repos.sh
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@timelf123
timelf123 / search-queries-in-google-docs
Created December 17, 2015 21:51 — forked from derekmartinla/search-queries-in-google-docs
Perform Search Query Analysis In One Google Doc
/**********************************************************************************************
* AdWords Account Management -- Review Search Queries & Post Adjustments via Google Docs.
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com & MixedMarketingArtist.com
*********************************************************************************************/
var GOOGLE_DOC_URL = "put your url here";
var START_DATE = '20150401';
var END_DATE = '20150415';
@timelf123
timelf123 / gist:6723ceae6ee32bce39b5
Created December 10, 2015 01:19 — forked from derekmartinla/gist:c660f7d326a04e2d418e
Ad-Group Callout Extension Example
// Set callout extensions on the ad group level for all active ad groups based on text sent in createCallouts()
// Change campaign selection criteria as needed
function main() {
campIter = AdWordsApp.campaigns().withCondition("CampaignName contains Brand").withCondition("CampaignName does_not_contain Remarketing").get();
var callouts = createCallouts();
while (campIter.hasNext()) {
camp = campIter.next();
@timelf123
timelf123 / gist:a61a1088830fcbb2b431
Created December 10, 2015 01:19 — forked from derekmartinla/gist:46bbbcd2e800111fd46f
Copy Existing AdWords Ads With A New Destination URL
function main() {
// change the CampaignName condition to whatever suits you
var adIter = AdWordsApp.ads().withCondition("CampaignName contains WP").withCondition("Status = ENABLED").get();
while(adIter.hasNext()) {
var ad = adIter.next();
var headline = ad.getHeadline();
var d1 = ad.getDescription1()
var d2 = ad.getDescription2();
@timelf123
timelf123 / gdn-placement-analysis
Created December 10, 2015 01:19 — forked from derekmartinla/gdn-placement-analysis
Find Underperforming Placements & Opportunities On Google Display Network
// This script reviews your GDN placements for the following conditions:
// 1) Placements that are converting at less than $40
// 2) Placements that have cost more than $50 but haven't converted
// 3) Placements that have more than 5K impressions and less than .10 CTR
function main() {
var body = "<h2>Google Display Network Alert</h2>";
body += "<h3>Placements that are converting at less than $40:</h3> " ;
body += "<ul>";
@timelf123
timelf123 / google-autocomplete
Created December 10, 2015 01:19 — forked from derekmartinla/google-autocomplete
AdWords Script That Leverges Google Autocomplete
/**********************************************************************************************************************
* Brand Keyword Analysis Google
* Leverages the Google Autocomplete feature to find potential keyword opportunities and negative keywowrds
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com or MixedMarketingArtist.com
**********************************************************************************************************************/
var hashMapResults = {};
var numOfKeywords = 0;
@timelf123
timelf123 / twitter-auto-unfollow.js
Created December 10, 2015 01:18 — forked from underdown/twitter-auto-unfollow.js
twitter auto unfollow
/*
Just nacigate to twitter.com/following (while logged in), hit f12 (on chrome) and paste this snippet into the console tab
originally found here: http://www.easytins.com/2014/01/how-to-unfollow-many-twitter-users.html
*/
setInterval(function(){t=
$(".following button:eq
(0)");if(!t