Skip to content

Instantly share code, notes, and snippets.

View alichtman's full-sized avatar
🏡
$HOME

Aaron Lichtman alichtman

🏡
$HOME
View GitHub Profile
@taavi223
taavi223 / .pythonrc.py
Last active April 19, 2024 13:37
.pythonrc.py
"""
This file is executed when the Python interactive shell is started if
$PYTHONSTARTUP is in your environment and points to this file. It's just
regular Python commands, so do what you will. Your ~/.inputrc file can greatly
complement this file.
Modified from sontek's dotfiles repo on github:
https://github.com/sontek/dotfiles
"""
@philipptempel
philipptempel / HOWTO.mac-set-file-icon.md
Last active January 5, 2023 17:44
How to set an icon for a file type on Mac?

Q: How to set an icon for some file types throughout the whole system?

For example, I have text files that ends with .scala extension and I want to associate an icon for that files through the whole system and for any newly created file of this extension.

Gisted from http://superuser.com/questions/178316/how-to-set-an-icon-for-a-file-type-on-mac

All credits go to the author of the accepted and top-voted answer by Daniel Beck

A: How to set an icon for a file type on Mac!

@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@AndiDittrich
AndiDittrich / AesUtil.js
Last active January 7, 2024 03:47
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// SPDX-License-Identifier: MPL-2.0
// AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// ----------------------------------------------------------------------------------------
// the encrypted datablock is base64 encoded for easy data exchange.
// if you have the option to store data binary save consider to remove the encoding to reduce storage size
// ----------------------------------------------------------------------------------------
// format of encrypted data - used by this example. not an official format
//
// +--------------------+-----------------------+----------------+----------------+
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 18:53
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@a-paxton
a-paxton / text-cleaning+word2vec-gensim.py
Created September 11, 2015 23:31
Cleaning Text Data and Creating 'word2vec' Model with Gensim
# preliminaries
from pymongo import MongoClient
from nltk.corpus import stopwords
from string import ascii_lowercase
import pandas as pd
import gensim, os, re, pymongo, itertools, nltk, snowballstemmer
# set the location where we'll save our model
savefolder = '/data'
@squarism
squarism / iterm2.md
Last active May 3, 2024 08:58
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)

Cheatsheet

Move cursor

command description
ctrl+a Move cursor to the start of the line
ctrl+e Move cursor to the end of the line
or ctrl+b Move cursor back one character
▶ or ctrl+f Move cursor forward one character
@ianklatzco
ianklatzco / catfact.py
Last active September 5, 2019 12:30
send cat facts to your friends logged into a ews/server. netid = username if you're not from uiuc
# if netid is logged in, send a random cat fact to all of its terminals.
# usage: crontab -e. paste in:
# 0 * * * * python ~/catfact.py
# logs in ~/victims.txt
# why did i spend so much time on this.
# this got me banned from the school servers for two days
messagechance = 5 # 1 is 1%, 99 is 99%. keep in mind this will only run if they're logged in.
postscript = '\n this has been an automated cat fact. contact me to unsubscribe. or to subscribe others.\n'
listofnetids = ['netids','go','here']
@soxofaan
soxofaan / README.md
Last active January 19, 2024 17:48
Simple pretty CSV and TSV file viewer.