Skip to content

Instantly share code, notes, and snippets.

@frenchie4111
frenchie4111 / download_video.js
Created October 5, 2018 17:08
Download Video from KinesisVideoArchivedMedia
const fs = require( 'fs' );
const AWS = require( 'aws-sdk' ),
moment = require( 'moment' ),
video_stitch = require( 'video-stitch' ),
ffmpeg = require( 'fluent-ffmpeg' );
const start_date = moment().subtract( 1, 'minutes' ).toDate();
const end_date = moment().toDate();
@frenchie4111
frenchie4111 / Screeps_Room_Bookmark.js
Last active March 23, 2018 08:59
Adds a room bookmark panel to screeps sidebar
// ==UserScript==
// @name Screeps Room Bookmarks
// @namespace https://screeps.com/
// @version 1.0.0
// @author Mike Lyons, frenchie4111
// @match https://screeps.com/a/*
// @run-at document-idle
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
@frenchie4111
frenchie4111 / Hashflare_History_Scraper.js
Created July 8, 2017 15:46
Tampermonkey Script for getting my Hashflare.io history
// ==UserScript==
// @name Hashflare History Scraper
// @version 0.1
// @author Mike Lyons <[email protected]>
// @match https://hashflare.io/panel/history
// @require http://code.jquery.com/jquery-3.2.1.min.js
// @require https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.js
// @require https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.13/moment-timezone-with-data.js

This is the format of my ~/programming folder:

~/programming
    archive/
        // This houses archived companies, I still want to keep their code, but
        // I don't need to see it every day    
    personal/
        archive/
            projects/
@frenchie4111
frenchie4111 / hn_frontpage_scrape.js
Created April 2, 2016 23:34
Example Node (4) script that pulls posts from the front page of Hacker News
/**
* Copyright (C) 2016 Michael Lyons
*
* This software may be modified and distributed under the terms
* of the MIT license.
*/
var _ = require( 'underscore' ),
q = require( 'q' ),
request = require( 'request' ),
#!/bin/bash
# This is a super simple script that blindly installs things
# from AUR
git clone https://aur.archlinux.org/${1}.git
cd ${1}
makepkg -sri
export default function( promises ) {
var caught_promises = promises.map( function( promise ) {
return promise.catch( function() {} );
} );
return Promise.all( caught_promises );
};
@frenchie4111
frenchie4111 / gist:ccc0d74ef75b9c3b31fe
Created June 14, 2015 02:03
Get licenses from package.json
/*
* Note: The code in this gist is in no way meant to be pretty, please do not judge my coding abilities
* based on it
*/
var package = require( './package.json' ),
_ = require( 'underscore' ),
q = require( 'q' ),
exec = require( 'child_process' ).exec;
### Keybase proof
I hereby claim:
* I am frenchie4111 on github.
* I am mlyons (https://keybase.io/mlyons) on keybase.
* I have a public key whose fingerprint is B150 425B 8B07 8720 E285 A967 1342 FF93 ED20 68BC
To claim this, I am signing this object:
@frenchie4111
frenchie4111 / BindableService.java
Last active August 29, 2015 14:02
Android service binding
public abstract class BindableService extends Service
{
LocalBinder binder = new LocalBinder();
public class LocalBinder extends Binder {
Service getService() {
// Return this instance of LocalService so clients can call public methods
return BindableService.this;
}
};