Skip to content

Instantly share code, notes, and snippets.

@ivanov
ivanov / Twitter Privacy Policy
Last active May 20, 2020 05:53
Twitter 2020-05-19 TOS / PP update
Privacy Policy
Download PDF
Download PDF
Information You Share With Us
Additional Information We Receive About You
Information We Share and Disclose
Managing Your Personal Information With Us
Children and Our Services
@ivanov
ivanov / EULA.txt
Last active April 11, 2020 02:18
Netscape 6.01 EULA + README.TXT (2001)
NETSCAPE 6 END-USER LICENSE AGREEMENT
Redistribution Or Rental Not Permitted
These terms apply to Netscape 6.
BY CLICKING THE ACCEPTANCE BUTTON FOR THE NETSCAPE 6 SOFTWARE
(THE "PRODUCT"), YOU ARE CONSENTING TO BE BOUND BY AND BECOME
A PARTY TO THIS AGREEMENT AS THE "LICENSEE."
IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT,
Deepnote
Our story
Join the team
Documentation
Privacy Policy
Effective date: January 1, 2019
@ivanov
ivanov / dropnewline.idr
Created April 18, 2018 05:49
The many ways of dropping trailing new lines in Idris
-- In Idris, fGetLine returns a string with a trailing newline. Here are
-- various ways of getting rid of it. I'm hoping I missed something more
-- straighforward. In all of the functions below, I'm assuming there is
-- exactly one '\n' character and that it occurs at the end of the string.
module Main
dropNewline0 : (x : String) -> String
dropNewline0 x =
fst $ break (== '\n') x
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ivanov
ivanov / SWC.ipynb
Created February 5, 2014 17:45
SWC demo notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# A template to demonstrate why we need to profile
# This instance written by Paul Ivanov (XXX: put your name / github id here)
def where_is_the_bottleneck(x):
pass
def could_be_this_one(x, y):
pass
def or_this_one(x):
@ivanov
ivanov / git-recheckout
Created November 7, 2013 20:16
Your local checkout of a branch, and the remote branch it tracks are out of sync. You want to check it out again, discarding your version of the branch.
#!/bin/bash
# git-recheckout: git reset to the upstream branch
#
# Your local checkout of a branch, and the remote branch it tracks are out of
# sync. You want to check it out again, discarding your version of the branch.
#
# Because you need to know the remotename/branchname string to reset to
#
# 1. get the remotename/the-branch combination
# 2. git reset remotename/the-branch