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 fs from 'fs'; | |
import { execSync } from 'child_process'; | |
import { unfurl } from 'unfurl.js'; | |
let bookmarksFile = '/Users/russell/Library/Application\ Support/Google/Chrome/Default/Bookmarks'; | |
let linksFile = 'links.json'; | |
let copyCommand = 'aws s3 cp ' + linksFile + ' s3://russellbeattie.com/pages/ ; aws cloudfront create-invalidation --distribution-id E3TJ5QZUCJTWJI --paths /pages/*'; | |
fs.copyFileSync(linksFile, 'bak/' + new Date().getTime() + '.json'); |
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
const https = require('https'); | |
main(); | |
async function main() { | |
let args = process.argv.slice(2); | |
let days = parseInt(args[0]) || 14; | |
let urlStr = 'https://www.cdc.gov/coronavirus/2019-ncov/json/new-cases-chart-data.json'; |
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
export default class Router { | |
constructor(){ | |
this.routes = []; | |
this.current = null; | |
} | |
add(route, handler) { | |
let re = new RegExp(route + '$'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Dwitterish</title> | |
<style> | |
body{ | |
background-color: #fff; | |
font-family: sans-serif; | |
} | |
.container{ |
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
function throttle(fn, limit, scope) { | |
var last; | |
var deferTimer; | |
return function() { | |
var context = scope || this; | |
var args = arguments; |
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
#!/usr/bin/env osascript -l JavaScript | |
function run(argv) { | |
var Mail = new Application("Mail"); | |
var inbox = Mail.inbox(); | |
var messages = inbox.messages(); |
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
var https = require('https'); | |
var http = require('http'); | |
var url = require('url'); | |
var feedUrl = 'http://www.techmeme.com/feed.xml'; | |
main(); | |
function main(){ |
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
var querystring = require('querystring'); | |
var https = require('https'); | |
var aws = require('aws-sdk'); | |
var s3 = new aws.S3(); | |
var sns = new aws.SNS({ | |
region: 'us-east-1' | |
}); | |
var query = '#SEARCH TERM HERE'; |
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
/** | |
* Copyright (c) 2014-2015, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in | |
* https://github.com/facebook/flux/blob/master/LICENSE. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
*/ |
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.example.helloworld; | |
import android.os.Bundle; | |
import org.apache.cordova.*; | |
public class HelloActivity extends CordovaActivity | |
{ | |
@Override | |
public void onCreate(Bundle savedInstanceState) | |
{ |
NewerOlder