Skip to content

Instantly share code, notes, and snippets.

Avatar

Sydney Sisco sydney-sisco

View GitHub Profile
@gerrard00
gerrard00 / tree_with_ignore.zsh
Created May 6, 2023 16:22
Make the tree CLI respect .gitignore without any additional packages
View tree_with_ignore.zsh
# make tree respect gitignore if we are in a repository
function tree_with_ignore() {
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
git ls-tree -r --name-only HEAD | tree --fromfile "$@"
else
tree $@
fi
}
alias tree="tree_with_ignore"
@oorjitchowdhary
oorjitchowdhary / db.js
Last active July 9, 2023 00:57
Passport.js + Firestore auth config
View db.js
require('dotenv').config();
const firebaseAdmin = require('firebase-admin');
firebaseAdmin.initializeApp({
credential: firebaseAdmin.credential.cert({
"type": process.env.TYPE,
"project_id": process.env.PROJECT_ID,
"private_key_id": process.env.PRIVATE_KEY_ID,
"private_key": process.env.PRIVATE_KEY.replace(/\\n/g, '\n'),
"client_email": process.env.CLIENT_EMAIL,
@CMCDragonkai
CMCDragonkai / view_images_on_the_command_line.md
Last active September 9, 2023 05:59
CLI: View Images on Command Line
View view_images_on_the_command_line.md

View Images on Command Line

When working with plotting like gnuplot or ggplot2 or just navigating your filesystem on the command line, it would be nice to be able to view bitmap or vector graphics easily.

This is all for the ideal of hybrid GUI TUI interface!!

However this turns out to be difficult. However I found pretty much 5 ways to

View random-emoji.js
var emojis = [
'😄','😃','😀','😊','☺','😉','😍','😘','😚','😗','😙','😜','😝','😛','😳','😁','😔','😌','😒','😞','😣','😢','😂','😭','😪','😥','😰','😅','😓','😩','😫','😨','😱','😠','😡','😤','😖','😆','😋','😷','😎','😴','😵','😲','😟','😦','😧','😈','👿','😮','😬','😐','😕','😯','😶','😇','😏','😑','👲','👳','👮','👷','💂','👶','👦','👧','👨','👩','👴','👵','👱','👼','👸','😺','😸','😻','😽','😼','🙀','😿','😹','😾','👹','👺','🙈','🙉','🙊','💀','👽','💩','🔥','✨','🌟','💫','💥','💢','💦','💧','💤','💨','👂','👀','👃','👅','👄','👍','👎','👌','👊','✊','✌','👋','✋','👐','👆','👇','👉','👈','🙌','🙏','☝','👏','💪','🚶','🏃','💃','👫','👪','👬','👭','💏','💑','👯','🙆','🙅','💁','🙋','💆','💇','💅','👰','🙎','🙍','🙇','🎩','👑','👒','👟','👞','👡','👠','👢','👕','👔','👚','👗','🎽','👖','👘','👙','💼','👜','👝','👛','👓','🎀','🌂','💄','💛','💙','💜','💚','❤','💔','💗','💓','💕','💖','💞','💘','💌','💋','💍','💎','👤','👥','💬','👣','💭','🐶','🐺','🐱','🐭','🐹','🐰','🐸','🐯','🐨','🐻','🐷','🐽','🐮','🐗','🐵','🐒','🐴','🐑','🐘','🐼','🐧','🐦','🐤','🐥','🐣','🐔','🐍','🐢','🐛','🐝','🐜','🐞','🐌','🐙','🐚','🐠','🐟','🐬','🐳','🐋','🐄','🐏','🐀','🐃','🐅','🐇','🐉','🐎','🐐','🐓','🐕','🐖','🐁','🐂','🐲','🐡','🐊','🐫','🐪','🐆','🐈','🐩','🐾',
@jj1bdx
jj1bdx / sleep5.sh
Created June 2, 2014 04:02
A shell one-liner for an infinite loop (sh/zsh/bash compatible)
View sleep5.sh
while true; do date; sleep 5; done
@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active July 10, 2023 07:31
Simple Authentication in Rail 4 Using Bcrypt
View authentication_with_bcrypt_in_rails_4.md

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps