Skip to content

Instantly share code, notes, and snippets.

@jsaddict
jsaddict / .htaccess
Created December 9, 2016 10:01 — forked from leocaseiro/.htaccess
Angular html5Mode apache working in a subdirectory /app using ngRoute
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*) /app/index.html [NC,L]
</IfModule>
@jsaddict
jsaddict / gist:14094b16c1615d6bbbcea2c30b3bb3ae
Created June 1, 2016 11:40 — forked from siygle/gist:9678772
Parse Gmail Inbox to sheet
function processInboxToSheet() {
//var threads = GmailApp.getInboxThreads();
// Have to get data separate to avoid google app script limit!
var start = 0;
var threads = GmailApp.getInboxThreads(start, 100);
var sheet = SpreadsheetApp.getActiveSheet();
var result = [];
for (var i = 0; i < threads.length; i++) {
var messages = threads[i].getMessages();
# create a new user (john for this example)
# just enter a password when asked, confirm it, and the other steps are optionals
sudo adduser john
# give root user the ownership of john's home directory
sudo chown root:root /home/john
# edit the ssh configuration file
sudo vim /etc/ssh/sshd_config
@jsaddict
jsaddict / introrx.md
Created April 23, 2016 14:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@jsaddict
jsaddict / google-apps-script.md
Created March 16, 2016 12:37 — forked from labnol/google-apps-script.md
The best resources for learning Google Apps Script, the glue that connects various Google services including Gmail, Google Drive, Calendar, Maps, Analytics and more.
@jsaddict
jsaddict / gist:6b41703117f6968ecf80
Created March 16, 2016 12:34 — forked from mhawksey/gist:1276293
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@jsaddict
jsaddict / 0_concept.js
Created March 1, 2016 07:33 — forked from tappleby/0_concept.js
Redux => To web worker
const composedCreateStore = compose(
applyMiddleware(
thunkMiddleware,
dispatchIdMiddleware,
webWorkerMiddleware('/build/worker.js'),
() => promiseMiddleware,
loggerMiddleware
),
createStore
);