Skip to content

Instantly share code, notes, and snippets.

View linglung's full-sized avatar

linglung

  • C+ Java
View GitHub Profile
@varun-raj
varun-raj / pullJSON.js
Last active March 15, 2025 17:32
Google App Script To Fetch Data From JSON Webservice and Write them to google spreadsheet.
function pullJSON() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
var sheet = ss.getActiveSheet();
var url="http://example.com/feeds?type=json"; // Paste your JSON URL here
var response = UrlFetchApp.fetch(url); // get feed
var dataAll = JSON.parse(response.getContentText()); //
@auycro
auycro / getDesktopPath.pas
Created June 13, 2014 03:26
Get Desktop Path #Delphi
uses ShlObj, ComObj, ActiveX;
//GET DESKTOP FOLDERS
function GetSystemPath(Folder: Integer): string;
var
PIDL: PItemIDList;
Path: LPSTR;
AMalloc: IMalloc;
begin
Path := StrAlloc(MAX_PATH);
@mhawksey
mhawksey / main.js
Last active March 9, 2020 02:09
Using Google Apps Script to proxy YouTube Analytics Channel report data http://mashe.hawksey.info/?p=16234
// instead of var results = YouTubeAnalytics.Reports.query(ids, start-date, end-date, metrics, optionalArgs);
var params = {"method" : "post",
"payload" : {'ids' : query.ids,
"startDate" : startDate,
"endDate": endDate,
"metrics": query.metrics,
"options": JSON.stringify(options)
}
};
var yt_data = UrlFetchApp.fetch("https://script.google.com/macros/s/YOUR_APP_ID/exec", params);
@kurokikaze
kurokikaze / gist:350fe1713591641b3b42
Created October 3, 2014 11:40
install chrome from powershell
(new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', 'c:/temp/chrome.exe');. c:/temp/chrome.exe /silent /install;rm c:/temp -rec
@sheharyarn
sheharyarn / YoutubeDownloader.md
Last active October 15, 2022 06:26
Download Videos from Youtube in (Ruby || PHP)

Youtube Downloaders

Download Youtube Videos using Ruby or PHP

Just copy the appropriate script, provide the video_id and run. It will list download links for different qualities and streams.

:P

@chipoglesby
chipoglesby / conditional-formatting.js
Last active May 18, 2022 23:34
Conditional Formatting in Google App Script based on cell value
//If the current cell is more than the previous cell, set it as lime green
function onEdit(e) {
var ss = SpreadsheetApp.getActive();
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var name = sheet.getName();
var range = sheet.getRange("A:J");
var values = range.getValues();
var cell = sheet.getActiveCell();
var value = cell.getValue();
@dgp
dgp / youtube api video category id list
Created June 11, 2015 05:57
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@ociredefz
ociredefz / google-script-add-fonts.gs
Created July 4, 2015 18:45
Google apps script to set different fonts in the sheets.
/**
* Google Script - Add Fonts.
* Add other fonts in Google Spreadsheet.
*
* a) Open 'Script editor'
* b) Add this script
* c) Save and run 'onOpen'
* d) Go to some 'Spreadsheet' project
* e) Click to 'Font Editor' and then to 'Change Font'
*/
@MauricioMoraes
MauricioMoraes / one_level_flatten.js
Created October 22, 2015 12:00
Javascript Flatten (for one level nested arrays) - Useful for google apps scripts on spreadsheets
// Takes and array of arrays matrix and return an array of elements.
function flatten(arrayOfArrays){
return [].concat.apply([], arrayOfArrays);
}
#!/bin/bash
# Anh Nguyen <[email protected]>
# 2016-04-30
# MIT License
# This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg.
# Make sure you have ffmpeg installed before running.
# The output command looks something like the below, but for as many images as you have in the folder.