Skip to content

Instantly share code, notes, and snippets.

View rascode's full-sized avatar
🎯
Focusing

rascode rascode

🎯
Focusing
View GitHub Profile
@rascode
rascode / GDLCalendar.js
Created April 27, 2013 22:46
Create a Calendar of the most recent Google Developer Live Videos
//Fetch the Google Developers Live (GDL) Live Calenar Using the YouTube API
function getGdlEvents(){
var channelID = "UC_x5XG1OV2P6uZZ5FSM9Ttw";
var yt = "https://www.googleapis.com/youtube/v3/activities";
var part = "snippet";
var maxResults = "50";
var key = "Your Google API Key";
var url = yt + "?part=" + part + "&channelId=" + channelID + "&maxResults=" + maxResults + "&key=" + key;
@rascode
rascode / GAS-spreadsheet-object-builder.js
Last active July 18, 2023 10:24
Use this script to build a javascript object array from a Google Spreadsheet.
//display custom menu
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Export to JSON')
.addItem('Get Sheet Header', 'getSheetHeader')
.addItem('Get Sheet Data', 'getSheetData')
.addItem('Download Spreadsheet as JSON', 'doGet')
.addToUi();
}
@rascode
rascode / fetchgithub
Created July 30, 2013 12:56
Pull Github issues from the specified repository and add them to the spreadsheet.
//Fetch Github Issues Using the YouTube API
function getGdlEvents(){
var channelID = "UC_x5XG1OV2P6uZZ5FSM9Ttw";
var yt = "https://www.googleapis.com/youtube/v3/activities";
var part = "snippet";
var maxResults = "50";
var key = "Your Google API Key";
var url = yt + "?part=" + part + "&channelId=" + channelID + "&maxResults=" + maxResults + "&key=" + key;
@rascode
rascode / onOpen
Created September 12, 2013 20:20
Create a Google Apps Script Menu
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [];
menuEntries.push({name: "Function Label", functionName: "doGet"});
menuEntries.push(null); // line separator
menuEntries.push({name: "Function Label", functionName: "doGet"});
ss.addMenu("Github", menuEntries);
@rascode
rascode / gulpfile.js
Created February 16, 2014 14:11
Sample Gulp Configuration
//declare gulp variables
var gulp = require('gulp'),
gulpUtil = require('gulp-util'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
autoprefixer = require("gulp-autoprefixer"),
sass = require('gulp-ruby-sass'),
@rascode
rascode / gulpfile.js
Created February 5, 2016 14:36 — forked from wnstn/gulpfile.js
Rails, Gulp, and Browsersync together at last
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var setupWatchers = function() {
gulp.watch(['./app/views/**/*.erb',
'./app/assets/javascripts/**/*.js'], ['reload']);
gulp.watch(['./app/assets/stylesheets/**/*.scss'], ['reloadCSS'])
};
gulp.task('reload', function(){
//Sample package.json configuration file
@rascode
rascode / GASApis.js
Created December 2, 2016 01:01
Google Apps Script Library
//Access the Spreadsheet - Declare globally
var ssid = ScriptProperties.getProperty('ssid'); //Spreadsheet ID. Value has been stored as a property
var ss = SpreadsheetApp.openById(ssid); //Opens the Spreadsheet using the stored property Spreadsheet ID
//Create variables for known sheets and all sheets
var iosSheet = getValueOfSheetByName("iOS"); //The iOS sheet
var gasSheet = getValueOfSheetByName("GAS"); //The Google Apps Script sheet
var allSheets = getValueOfAllSheets(); //All Sheet Values
@rascode
rascode / Podfile
Last active June 14, 2017 15:21
Podfile template that includes my most commonly used Swift libraries.
platform :ios, '10.0'
use_frameworks!
target 'MyApp' do
#Realm
#pod 'RealmSwift'
#Firebase Pods - https://firebase.google.com/docs/ios/setup
#pod 'Firebase/Core' #Prerequisite libraries and Analytics
#pod 'Firebase/Database'
@rascode
rascode / Proposed API Response Format.json
Last active October 24, 2017 18:41
Onit AP Web API: Proposed Changes to Response
{
"success": true,
"data": [
{
"p_vendor_name": "Gold USD Vendor",
"p_vendor_office_name": "Gold USD Vendor",
"p_vendor_office_id": "987654",
"p_invoice_amount": {
"cents": 225000,
"currency_iso": "USD"