Skip to content

Instantly share code, notes, and snippets.

View rubiin's full-sized avatar
πŸ’―
:octocat: Testing this status thing

Rubin Bhandari rubiin

πŸ’―
:octocat: Testing this status thing
View GitHub Profile
## All sass font weights:
```
$font-weights: ("thin":100,"extrlight":200,"light": 300,"regular": 400, "medium": 500,"semibold":600, "bold": 700,"extrabold":800,"black":900);
```
### Usage:
```
.selector{
@rubiin
rubiin / reset.css
Created June 7, 2023 17:19
basic reset css
* {
margin: 0;
padding: 0;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
#!/bin/bash
echo "setting zsh and omyzsh"
sudo apt-get udate
sudo apt-get upgrade
sudo apt-get install zsh make fonts-powerline -y
sudo chsh ubuntu -s $(which zsh)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
echo "setting asdf and nodejs"
@rubiin
rubiin / Dockerfile
Created August 20, 2022 11:40 — forked from micalevisk/Dockerfile
Production Dockerfile example for NestJS projects.
## ===========================================================> The common stage
FROM node:16.14 AS base
ENV NODE_ENV=production
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
## Remove unnecessary files from `node_modules` directory
Vue.js 4 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 53.0%
TypeScript 3 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 34.6%
CSS 1 min β–ˆβ–ˆβ–Œβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 12.0%
JavaScript 0 secs β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0.4%
@rubiin
rubiin / css-starter
Created September 1, 2021 20:08
variables and resets for css project start
/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Raleway:wght@500;600;700&display=swap");
/*============ VARIABLES =============*/
:root {
--header-height: 3rem;
/*========== Colors ==========*/
/* Change favorite color to match images */
@rubiin
rubiin / fix-zsh
Created October 19, 2020 14:38
fixes zsh bad history file
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history
for i in *;
do ffmpeg -n -loglevel info -i "$i" -vcodec libx264 -crf 28 -preset faster -tune film "cc${i}";
done
@rubiin
rubiin / aes-256-cbc.js
Created July 6, 2020 05:10 — forked from siwalikm/aes-256-cbc.js
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {
@rubiin
rubiin / lazynvm.sh
Created October 16, 2019 07:33 — forked from fl0w/lazynvm.sh
# lazyload nvm
# all props goes to http://broken-by.me/lazy-load-nvm/
# grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/
lazynvm() {
unset -f nvm node npm npx
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
if [ -f "$NVM_DIR/bash_completion" ]; then
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion