Skip to content

Instantly share code, notes, and snippets.

@JaxonWright
JaxonWright / Tesla Chromium Injected Scrollbar CSS
Last active Jan 24, 2020
The CSS for the webkit scrollbar that is injected into every website by the Tesla Chromium browser installed in most Tesla vehicles. Kudos to @rob2d for helping me find this!
View Tesla Chromium Injected Scrollbar CSS
<style>
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #ddd; border-radius: 6px; }
::-webkit-scrollbar-thumb { background: #bbb; }
</style>
@afternoon
afternoon / rename_js_files.sh
Created Feb 15, 2014
Rename .js files to .ts
View rename_js_files.sh
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@gnarf
gnarf / ..git-pr.md
Last active Jan 24, 2020
git pr - Global .gitconfig aliases for Pull Request Managment
View ..git-pr.md

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@takluyver
takluyver / asyncio_magic.py
Created Jan 25, 2016
Cell magic for 'await' expressions in IPython
View asyncio_magic.py
# (c) Thomas Kluyver, 2016
# Use it under the MIT license
# This is fairly experimental. Use at your own risk.
import ast
from ast import Call, Attribute, Name, Load
import asyncio as asyncio_mod
#import astpp
from IPython.utils.text import indent
@iros
iros / API.md
Created Aug 22, 2012
Documenting your REST API
View API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@Kartones
Kartones / postgres-cheatsheet.md
Last active Jan 24, 2020
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active Jan 24, 2020
crack activate office on mac with license file
View Activate Office 2019 for macOS VoL.md

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@junkblocker
junkblocker / disable.sh
Last active Jan 24, 2020 — forked from pwnsdx/disable.sh
Disable bunch of #$!@ in Catalina
View disable.sh
#!/bin/bash
if [[ "$(sw_vers -productVersion)" != 10\.15* ]]; then
echo "This is only meant to run on macOS 10.15.* Catalina" >&2
exit 1
fi
reply=
printf "Are you pretty damn sure you want to run this? (Yes/No) "
read -r reply
[[ $reply != Yes ]] && exit 1
@kellishouts
kellishouts / usercss-hacked-gmail.css
Last active Jan 24, 2020
I Hacked Gmail with an Inbox-Inspired Theme :D
View usercss-hacked-gmail.css
/*--- #3. Hack the Tab Labels ---*/
/* Hide Ugly Tab Labels */
.aAy.aIf-aLe .aKx .aKz,
.aAy.aJi-aLe .aKx .aKz,
.aAy.aH2-aLe .aKx .aKz,
.aAy.aHE-aLe .aKx .aKz{
display: none;
}
@jbroadway
jbroadway / Slimdown.md
Last active Jan 24, 2020
Slimdown - A simple regex-based Markdown parser.
View Slimdown.md

Slimdown

A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions
You can’t perform that action at this time.