Skip to content

Instantly share code, notes, and snippets.

set smoothscroll
let scrollstep = 170
let completionengines = ["google", "youtube"]
let searchalias g = "google"
let searchalias y = "youtube"
let defaultengine = "duckduckgo"
let blacklists = ['https://mail.google.com/*','*://mail.google.com/*','@https://mail.google.com/mail/*','*://localhost/*.ipynb*','http://localhost:8888/lab']
site '*://trello.com/*/*/todo' {
@ggada
ggada / iTunes
Created April 2, 2019 00:01
iTunes replacement for YouTube Music
#!/usr/bin/env osascript
tell application "System Events"
tell process "Google Chrome"
set frontmost to true
perform action "AXRaise" of window 1
keystroke "0" using {shift down, command down}
end tell
end tell
@ggada
ggada / time-ticks.json
Last active May 21, 2018 04:06
Vega time ticks precision
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"values": [
{
"date": "2018-05-01",
"value": 1
},
{
"date": "2018-05-02",
@ggada
ggada / tmux.sh
Created March 28, 2018 19:51
Compile tmux on ubuntu
# install tmux from source because the ubuntu repo version is outdated
sudo apt install checkinstall automake libevent libevent-dev libncurses5-dev
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make
sudo checkinstall # this might give you a version number format error and few other warnings, you can enter it as "2.7-rc1" or whatever the version is when you clone
@ggada
ggada / viz-report.R
Created May 24, 2017 04:42
R code for visualization report - INFX 561
library(devtools)
install_github("mikeasilva/blsAPI")
install.packages("data.table")
install.packages("wbstats")
library(wbstats)
@ggada
ggada / index.html
Last active May 15, 2017 07:23
D3 tutorial
<!DOCTYPE html>
<meta charset="utf-8">
<style>
/*styling*/
.barplot rect {
fill: steelblue;
}
.barplot text {
@ggada
ggada / r-check-packages.R
Created April 22, 2017 00:36
R check packages
req.pkg <- c("tidyverse", "ggmap")
install.diff <- req.pkg[!(req.pkg %in% installed.packages()[,"Package"])]
if(length(install.diff)) install.packages(install.diff)
@ggada
ggada / notebook.json
Last active June 17, 2022 06:16
Jupyter notebook.json: ~/.jupyter/nbconfig/notebook.json
{
"kse_rebinds": {
"edit": [],
"command": [
{
"to": ";",
"action_name": "jupyter-notebook:run-all-cells-above"
}
]
},
@ggada
ggada / ipython_config.py
Last active June 26, 2018 10:24
IPython configuration: ~/.ipython/profile_default/ipython_config.py
c = get_config()
# Show any variable that stands on its own line
c.InteractiveShell.ast_node_interactivity = "all"
# Inline matplotlib plotting please
c.InteractiveShellApp.matplotlib = "inline"
# Retina screen, so better resolution please
c.InlineBackend.figure_format = 'retina'
@ggada
ggada / custom.css
Last active April 15, 2017 22:52
Jupyter Notebook CSS: ~/.jupyter/custom/custom.css
.container {
width:100% !important;
}