Skip to content

Instantly share code, notes, and snippets.

View djrobby's full-sized avatar

Robby Dhillon djrobby

  • Detroit, MI - USA
View GitHub Profile
@pmatsinopoulos
pmatsinopoulos / 2d4b773e721dea3425da25823f3d7691.ruby
Created June 14, 2019 05:01
2d4b773e721dea3425da25823f3d7691.ruby
# File: encryption-7.rb
#
require 'digest'
module Encryption
module InstanceMethods
def encrypt
Digest::SHA256.base64digest message_to_encrypt
end
end
@M-Shehu
M-Shehu / List_Of_Resources.md
Last active August 1, 2021 08:58
List of resources of my development tools

My Software Development Resource List

This is a curated list of my resources I use for software development. This list is mainly focused on tools I use for front-end development for now but will be updated in the nearest future to include my backend tools as well. Do leave a comment down below if you find this list helpful or you think there's a really cool tool missing from this list. I'll check the tool out and I'll update the list accordingly.

Contents of this list

The list is divided into 3 different categories:

@mario-subo
mario-subo / localStorage.ts
Last active July 5, 2022 16:26
simple JS local storage utility
export const setLocalStorage = (key: string, value: any) => {
if (typeof key !== "string") {
throw new Error(`Error in localStorage: key ${key} must be of type string but is ${typeof key}`);
}
const typeOfValue = typeof value;
console.log(`localStorage: about to save value of type ${typeOfValue} for key ${key}`);
let valueToStore;
switch (typeOfValue) {
case "string":
@bitsurgeon
bitsurgeon / youtube.md
Last active April 23, 2025 12:42
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">
@evadne
evadne / script.sh
Created April 28, 2019 19:23
Properly invoke Sublime Text from WSL
function subl () {
SublimePath="/mnt/c/Program Files/Sublime Text 3/subl.exe"
TargetPath=$(readlink -f $1)
HomePath="/home/evadne"
ProjectsPath=$(readlink -f $HomePath/projects)
SublimeProjectsPath=$(readlink -f $HomePath/sublime)
echo "Editing $TargetPath"
case $TargetPath/ in
$ProjectsPath/*)
@gutschilla
gutschilla / install-project-on-fresh-ubuntu.bash.sh
Last active November 8, 2024 22:09
provisioning server for elixir
#! /bin/bash
# I am exporting variables to have them in my shell after I ran the script.
# I find that convenient. Of course, those can/should be removed in "serious" deployments.
# create a time string between "1:00" and "5:59"
export REBOOT_TIME=`perl -e "print scalar(int 1 + 5 * rand) . q[:] . scalar(int 6 * rand) . scalar(int 9 * rand)"`
export HOSTNAME=`hostname`
export NETWORK_DEVICE=eth0 # might be different in cloud servers
@vetali
vetali / create_calendar_table.sql
Last active March 22, 2024 11:53
Calendar table for MySql
SET FOREIGN_KEY_CHECKS = 0;
/* Drop Tables */
DROP TABLE IF EXISTS calendar CASCADE;
/* Create Tables */
CREATE TABLE calendar (
id DATE NOT NULL,
year SMALLINT NOT NULL,
@johannaratliff
johannaratliff / learning-golang.md
Last active April 14, 2025 14:57
Golang Rampup

Context

This is for programmers who want to ramp on Go, without resources that reiterate programming fundamentals. This would not be a good list of resources for folks who are learning to program using Go as their first language. Some resources that I dismiss here would be super valuable for newer folks. This is a selection of resources for those who understand programming fundamentals in a different language already.

Advice

  1. First steps = Tour of Go
  2. Don't waste time on Go Fundamentals-type books - it all lives in tour of Go.
  3. Consider joining the Gophers Slack
  4. When you need help, the Go Playground allows you make a quick scratch file and share it. Others trying to help can run your code easily this way.
#!/usr/bin/env bash
# Back up Script to Daily Full Backups
# Source:
# Author: Amit
DAY=$(date +"%Y%m%d")
MONTH=$(date +"%Y%m")
YEAR=$(date +"%Y")
YDAY=$(date -d '-1 day' '+%Y%m%d')

Algorithmic layouts

You are looking at the most important, and most abundant thing on the web. You can't see it, unfortunately, because it's very small… aaaaand it's invisible — so having a magnifying glass doesn't really help here. But still.

I'm talking, of course, about U+0020; not to be confused with the band U2, who are just as ubiquitous, but far less useful.

This unicode point, representing the humble space character, is between every word, in every run of text, on every page of the web. And it has a very special characteristic: it's not sticky like glue. If two words are neighbors but there's not enough room for both of them, the space will free the second word to wrap around and start a new line.

Before getting into flexible containers, viewport meta tags, and @media breakpoints this humble character is what makes the web fundamentally 'responsive'. That is: able to change the layout of its content to suit different devices, contexts, and settings. Browser text does this automa