Skip to content

Instantly share code, notes, and snippets.

@sujancse
sujancse / git-revert-commit-hash.txt
Last active August 6, 2018 09:26
Git revert back to #commit_hash with HEAD
git reset --hard #commit_hash
Then commit and
git push --force
@sharmaeklavya2
sharmaeklavya2 / cp_syllabus.md
Last active March 29, 2024 12:24
Competitive Programming Syllabus

Competitive Programming Syllabus

Geometry

  • Problems - Refer the article for a list of problems which can be solved using Rotating Calipers technique.
@mholt
mholt / transcript
Created February 26, 2016 18:42
Is it necessary to consume response body before closing it (net/http client code)?
mholt [9:10 AM]
When using http.Get(), is it really necessary to read the full response body just to close it later?
[9:10]
The docs keep saying `Caller should close resp.Body when done reading from it.` and I keep seeing code like this:
```
io.Copy(ioutil.Discard, resp.Body)
resp.Body.Close()
```
@wontoncc
wontoncc / balloontip.py
Last active March 1, 2024 15:47
Balloon tip module, Python, using win32gui.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip: