This file contains 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
from HTMLParser import HTMLParser | |
import json | |
class HtmlToJson(HTMLParser): | |
""" | |
Transforms HTML to a simplified JSON format. | |
""" | |
def __init__(self, tag_filters): | |
HTMLParser.__init__(self) | |
self._records = [] |
This file contains 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
out log --pretty=oneline --abbrev-commit --graph @{u}.. | |
in !git fetch && git log --pretty=oneline --abbrev-commit --graph ..${1:-@{u}} } | |
br checkout -b | |
cd checkout | |
co checkout | |
current rev-parse --abbrev-ref HEAD | |
cur rev-parse --abbrev-ref HEAD | |
recent !git reflog --date=local | head ${1:-} | |
graph log --graph --decorate --color --all --topo-order | |
hash rev-parse HEAD |
This file contains 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
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
This file contains 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
_onNotificationExpanded: function() { | |
let expandedY = this._notification.actor.height - this._notificationBin.height; | |
// Don't animate the notification to its new position if it has shrunk: | |
// there will be a very visible "gap" that breaks the illusion. | |
// This isn't really working at the moment, but it was just crashing before | |
// if it encountered a critical notification. expandedY is always 0. For now | |
// just make sure it's not covering the top panel if there is one. | |
let monitor = Main.layoutManager.primaryMonitor; |
This file contains 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
package main | |
import ( | |
"fmt" | |
"image/png" | |
"os" | |
) | |
// DefaultCompression | |
// NoCompression |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Gist"> | |
<Require feature="dynamic-height"/> | |
</ModulePrefs> | |
<UserPref name="id" display_name="Gist ID" required="true" default_value="9088612"/> | |
<UserPref name="font_size" display_name="Font size (px)" required="true" default_value="12"/> | |
<UserPref name="line_height" display_name="Line height (px)" required="true" default_value="16"/> | |
<Content type="html"> | |
<![CDATA[ |