Skip to content

Instantly share code, notes, and snippets.

View stankud's full-sized avatar

Stan Kudrow stankud

  • Figure
  • The Salvor Hardin Museum of Origins
View GitHub Profile
;;; change back-up folder directory
;;; (setq backup-directory-alist '(("." . "~/.emacsBackups")))
;;; no backup files
(setq make-backup-files nil)
;;; use js-mode for .js/json files
(add-to-list 'auto-mode-alist '("\\.json$" . js-mode))
;;; bind meta key to option
@stankud
stankud / halloween.js
Last active December 27, 2015 02:09
Change page to a picture after 5 seconds if it's Halloween
docucument.onload = function)() {
var seconds = 5
var today = new Date()
if (today.getMonth() == 9 && today.getDate() == 31){
setInterval(function(){
body = getElementsByTagName('body');
body[0].innerHTML = '<img src="http://i.imgur.com/iPOS6.gif">';
}, (seconds*1000));
}
}
@stankud
stankud / stars_tutorial.js
Last active December 27, 2015 12:59
Create a stars background with Kinetic.js
//1. Create the app object to have easy access to all variables.
var app = {
};
//2. Add an initialize function to our app objects to have it called when the document is ready and create origin variables
var app = {
// add initialize method to our app
{
"social_channel":"facebook_future",
"social_channel_url":"https://www.facebook.com/thefutureisnowbymic",
"ip_address":"${keen.ip}",
"keen":{
"addons":[
{
"name":"keen:ua_parser",
"input":{
"ua_string":"user_agent"
{
"social_channel_url":"https://www.facebook.com/thefutureisnowbymic",
"domain":"mic.com",
"visitor":"85ff9745-c673-4990-82c5-ee1d54b2a78c",
"duration":421,
"timezone":300,
"ad_blocker":false,
"ip_address":"72.69.2.7",
"section":"tech",
"referrer_type":"other",
{
"id": "cj0se5d36061w01nlmthpr5w1",
"timestamp": "2017-03-16T15:30:11.252Z",
"created_at": "2017-03-16T15:30:11.252Z"
}
{
"city":"New York",
"zipcode":"10007",
"timezone_offset":-5,
"latitude":40.7121,
"connection_type":"fttx",
"timezone_name":"America/New_York",
"isp_name":"Lightower Fiber Networks I",
"organization_name":"Lightower Fiber Networks",
"country":"US",