Skip to content

Instantly share code, notes, and snippets.

View music2code's full-sized avatar
😎
Focusing

Star music2code

😎
Focusing
  • Walmart - New Product Innovation
  • Brooklyn, NY
View GitHub Profile
@gjerokrsteski
gjerokrsteski / remove env file from git forever
Last active November 20, 2024 09:48
remove env file from git history forever
echo '.env' >> .gitignore
git rm -r --cached .env
git add .gitignore
git commit -m 'untracking .env'
git push origin master
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@vlucas
vlucas / encryption.js
Last active December 23, 2024 15:52
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@bahmutov
bahmutov / Docker shell commands.sh
Last active February 9, 2024 07:55
A personal cheat sheet for running local Node project in a Docker container
# See list of docker virtual machines on the local box
$ docker-machine ls
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
# Note the host URL 192.168.99.100 - it will be used later!
# Build an image from current folder under given image name
$ docker build -t gleb/demo-app .
@gokulkrishh
gokulkrishh / media-query.css
Last active December 21, 2024 11:12
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */