Skip to content

Instantly share code, notes, and snippets.

View acoyfellow's full-sized avatar
🤖
Building

Jordan Coeyman acoyfellow

🤖
Building
View GitHub Profile
@acoyfellow
acoyfellow / gist:72cfc18acb2f0eee0b96
Last active August 29, 2015 14:13
Failing Go + Socket.io CORS server
package main
import (
"log"
"net/http"
"github.com/googollee/go-socket.io"
)
func SayHelloWorld(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, World!"))
@acoyfellow
acoyfellow / gist:167b055da85248c94fc4
Created January 8, 2015 19:37
Socket.io + Golang CORS ?
package main
import (
"log"
"net/http"
"github.com/googollee/go-socket.io"
)
func SayHelloWorld(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, World!"))
@acoyfellow
acoyfellow / gist:ed8d4bb18e57c0542792
Last active March 30, 2017 00:49
How to fire a Facebook Custom Audience pixel after 30 seconds with Javascript
/*
****** A normal Facebook retargeting pixel looks like this:
__________________________________________________________________________
__________________________________________________________________________
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
@acoyfellow
acoyfellow / entry.js
Created April 21, 2015 10:23
SendGrowth's Realtime Counter
'use strict';
(function() {
/*
1. Depending on how this file is called, it does a different thing.
2. "auth"=url
3. all/single page option
4. total/active option
<script page="all" cat="total" label="You are visitor number:" href="" src="//ex.io/js.js"></script>
@acoyfellow
acoyfellow / Realtime-Counter.js
Last active October 4, 2017 06:39
A simple website counter that tracks website hits in real-time, uses Firebase
'use strict';
(function() {
var Firebase = require('firebase'),
Database = new Firebase('https://sendgrowth-counter.firebaseio.com/'),
pageURL = document.URL.split('.').join('_'),
pageURL = pageURL.split('/').join('*'),
domain = window.location.host,
rootRef = null,
pagePref='one',
labelPref,
@acoyfellow
acoyfellow / webpack.config.js
Created May 3, 2015 22:27
SendGrowth example webpack.config.js
var webpack = require("../node_modules/webpack");
module.exports = {
context: __dirname,
entry: './entry.js',
output:{
path: __dirname + '/assets/js',
filename: 'counter.js'
},
plugins: [
@acoyfellow
acoyfellow / gist:2db737c8475cacf2c5b0
Last active March 2, 2016 16:36
pixel & redirect pure javascript
<!DOCTYPE html>
<html>
<head>
<title>Redirecting To Your Product...</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
@acoyfellow
acoyfellow / Default-568h@2x.png
Created March 24, 2016 21:41 — forked from uebo/Default-568h@2x.png
iOS Sample Launch Screen File
Default-568h@2x.png
document.querySelectorAll('div.ProfileCard-actions > div > div > div > button').forEach(function(btn){
var style = window.getComputedStyle(btn.querySelector('span.button-text.follow-text'));
if(style.display === 'block'){
btn.click();
};
});
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"AddPerm",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::examplebucket/*"]
}