Skip to content

Instantly share code, notes, and snippets.

View Srijancse-zz's full-sized avatar
😎
zZZ

Srijan Agarwal Srijancse-zz

😎
zZZ
View GitHub Profile
@nathansobo
nathansobo / log-linear-goto-intuition.md
Last active June 27, 2019 08:11
Intuition for `merge_op` in Raph Levein's GOTO implementation

When merging an operation O, there may be several operations scattered through the local history that are concurrent to O. We need to rearrange our history so that all of these concurrent operations are moved to the end of the history. Then we can transform O against each of these concurrent operations and append it to the end.

Say we're adding O a history with the following suffix. The operations surrounded by vertical bars are concurrent to O. Otherwise the operations causally precede O.

EO0 |EO1| EO2 EO3 |EO4| |EO5| EO6

We need to rearrange this history so it looks like this.

@sakshamsaxena
sakshamsaxena / Keeping your fork up to date.md
Last active June 13, 2018 10:33 — forked from CristinaSolana/gist:1885435
Keeping your fork up to date

1. Clone your fork:

git clone git@github.com:USERNAME/FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-USERNAME/ORIGINAL-REPO.git
git fetch upstream
@varun-raj
varun-raj / pullJSON.js
Last active October 31, 2022 16:19
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()); //
@casschin
casschin / gist:1990245
Created March 7, 2012 01:16
Python webdriver api quick sheet
### Locating UI elements ###
# By ID
<div id="coolestWidgetEvah">...</div>
element = driver.find_element_by_id("coolestWidgetEvah")
or
from selenium.webdriver.common.by import By
element = driver.find_element(by=By.ID, value="coolestWidgetEvah")
# By class name: