Skip to content

Instantly share code, notes, and snippets.

View avinashkoyyana's full-sized avatar

avinash avinashkoyyana

View GitHub Profile
@avinashkoyyana
avinashkoyyana / reclaimWindows10.ps1
Created October 17, 2019 07:36 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> 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 ...
@avinashkoyyana
avinashkoyyana / GDriveFolderCreate.gs
Created October 22, 2017 22:10
Google drive Folder Creation from Google sheets
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
@avinashkoyyana
avinashkoyyana / Batch_py2ipynb.py
Created September 28, 2015 07:14
Bulk Convert Python files to IPython Notebook Files. Source:http://bit.ly/1iE0vx7
import os
from json.encoder import JSONEncoder
nb_start = '''{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"""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
@avinashkoyyana
avinashkoyyana / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@avinashkoyyana
avinashkoyyana / CountLinesOfCodeInGitRepo
Last active August 29, 2015 14:08
count no of lines in a git repository
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*/
@avinashkoyyana
avinashkoyyana / gist:7944221
Created December 13, 2013 13:29
Copy YouTube playlists to your profile From amit Agarwal credit to amit source : http://ctrlq.org/code/19554-youtube-google-data-api
<?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';
@avinashkoyyana
avinashkoyyana / trim.js
Last active December 15, 2015 09:38 — forked from scodx/trim.js
Set of funcitons that trims a string in Javascipt
/**
* 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+/,"");
}