Skip to content

Instantly share code, notes, and snippets.

View soto97's full-sized avatar

Alejandro Soto soto97

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2024 06:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@thriveth
thriveth / CBcolors.py
Created January 22, 2014 14:52
A color blind/friendly color cycle for Matplotlib line plots. Might want to shuffle it around a bit more,but already not it gives kinda good contrasts between subsequent colors, and shows reasonably well in colorblind filters (though not in pure monochrome).
CB_color_cycle = ['#377eb8', '#ff7f00', '#4daf4a',
'#f781bf', '#a65628', '#984ea3',
'#999999', '#e41a1c', '#dede00']
@mbostock
mbostock / .block
Last active January 30, 2024 13:24
Calendar View
license: gpl-3.0
height: 2910
border: no
redirect: https://observablehq.com/@d3/d3-calendar-view
@ryangray
ryangray / buttondown.css
Created February 22, 2012 06:45
A clean, minimal CSS stylesheet for Markdown, Pandoc and MultiMarkdown HTML output.
/*
Buttondown
A Markdown/MultiMarkdown/Pandoc HTML output CSS stylesheet
Author: Ryan Gray
Date: 15 Feb 2011
Revised: 21 Feb 2012
General style is clean, with minimal re-definition of the defaults or
overrides of user font settings. The body text and header styles are
left alone except title, author and date classes are centered. A Pandoc TOC
@kogakure
kogakure / .gitignore
Last active December 17, 2023 08:21
Git: .gitignore file for LaTeX projects
*.acn
*.acr
*.alg
*.aux
*.bak
*.bbl
*.bcf
*.blg
*.brf
*.bst
@robinsloan
robinsloan / shh.rb
Last active August 18, 2023 12:09
Disable RTs from all the people you follow on Twitter.
require "rubygems"
require "twitter"
# get these from apps.twitter.com
CONSUMER_KEY = "foo"
CONSUMER_SECRET = "bar"
OAUTH_TOKEN = "blee"
OAUTH_TOKEN_SECRET = "baz"
TWITTER_USER = "your_username" # needs to be the one associated with keys above
@jiaaro
jiaaro / retirement calc.md
Last active December 3, 2022 18:51
A Simple, Easy-to-edit Retirement Saving Calculator (in python)

Retirement Calculator

  • ages are in years
  • contribution, and savings are in dollars
  • avg_annual_return is a ratio, so 1.07 is a 7% annual return

let's say I'm 25 years old, I am going to contribute $2000/yr in bonds (~5% return), and I've already invested $5700 in bonds

@defulmere
defulmere / nextcloud_on_opalstack.md
Last active August 24, 2022 01:49
Nextcloud on Opalstack

HOWTO install Nextcloud on Opalstack

  1. In your Opalstack dashboard create a new "Nginx Proxy Port" application and attach it to a site with Let's Encrypt enabled on the site. Make a note of the app's name and port assignment, and the site domain.

  2. In your Opalstack dashboard create a new MariaDB database and user. Make a note of the DB name, DB user name, and password.

  3. SSH to your app's shell user and run the following commands:

    cd ~/apps/appname
    git clone -b opalstack https://github.com/rsanden/userspace-fpm-installer.git
    cd userspace-fpm-installer
    
@Raefael
Raefael / deleting_merging_partitions
Created June 12, 2013 07:34
Deleting and merging a partition with diskutil from the command line OS X
/**
* diskutil list shows you the partitions currently connected to your unit
**/
imac:~ user$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 987.2 GB disk0s2
@Diapolo10
Diapolo10 / example.py
Last active February 11, 2022 19:00
Python style guide example
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# The above two lines specify two things. The order must always be the same if both are used.
# The first line is a shebang, used by Unix-like systems to determine how to run a file.
# The second is a way to specify the encoding used by the file.
# Neither are necessary, especially the second one, since Python 3 is UTF-8 by default.
"""