This file contains hidden or 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
########## | |
# Tweaked Win10 Initial Setup Script | |
# Primary Author: Disassembler <[email protected]> | |
# Modified by: alirobe <[email protected]> based on my personal preferences. | |
# Version: 2.20.2, 2018-09-14 | |
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/ | |
# Tweak difference: | |
# | |
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ... |
This file contains hidden or 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 onOpen() { //This is the new standard script for the onOpen trigger that creates a menu item. var ui = SpreadsheetApp.getUi(); // Or DocumentApp or FormApp. ui.createMenu('GDrive') .addItem('Create new Folders', 'crtGdriveFolder') .addToUi(); } | |
function crtGdriveFolder() { var sheet = SpreadsheetApp.getActiveSheet(); var startRow = 2; // First row of data to process var numRows = sheet.getLastRow(); // Number of rows to process var maxRows = Math.min(numRows,20); //Limit the number of rows to prevent enormous number of folder creations var folderid = sheet.getRange("C2").getValue(); var root = sheet.getRange("D2").getValue(); var dataRange = sheet.getRange(startRow, 1, maxRows, 2); //startRow, startCol, endRow, endCol var data = dataRange.getValues(); var folderIterator = DriveApp.getFoldersByName(folderid); //get the file iterator | |
if(!folderIterator.hasNext()) { SpreadsheetApp.getActiveSpreadsheet().toast('Folder not found!'); return; } | |
var parentFolder = folderIterator.next(); | |
if(folderIterator |
This file contains hidden or 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 os | |
from json.encoder import JSONEncoder | |
nb_start = '''{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": false |
This file contains hidden or 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
"""waybacktrack.py | |
Use this to extract Way Back Machine's | |
url-archives of any given domain! | |
TODO: reiterate entire design! | |
""" | |
import time | |
import os | |
import urllib2 | |
import random | |
from math import ceil |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
git diff --stat `git hash-object -t tree /dev/null` | |
wc -l $(git ls-files | grep '.*\.cs') | |
/*source : http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository*/ |
This file contains hidden or 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
<?php | |
require_once 'php-google-api-client/src/Google_Client.php'; | |
require_once 'php-google-api-client/src/Google_YouTubeService.php'; | |
session_start(); | |
$OAUTH2_CLIENT_ID = 'apps.googleusercontent.com'; | |
$OAUTH2_CLIENT_SECRET = 'labnol'; | |
This file contains hidden or 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
/** | |
* Set of funcitons that trims a string in Javascipt :) | |
**/ | |
function trim(stringToTrim) { | |
return stringToTrim.replace(/^\s+|\s+$/g,""); | |
} | |
function ltrim(stringToTrim) { | |
return stringToTrim.replace(/^\s+/,""); | |
} |