Skip to content

Instantly share code, notes, and snippets.

View headStyleColorRed's full-sized avatar
🍊
Learning Ruby! :D

headStyleColorRed headStyleColorRed

🍊
Learning Ruby! :D
View GitHub Profile
@headStyleColorRed
headStyleColorRed / map-reader-struct
Last active May 17, 2020 16:48
Wolfentstein map struct
typedef struct s_color
{
int r_color;
int g_color;
int b_color;
} t_color;
typedef struct s_resolution
{
int width;
/*-------------- IPHONE 5 ----------------*/
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation: portrait) { }
/*-------------- IPHONE 6 ----------------*/
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation: portrait) { }
/*---------------- IPAD ----------------*/
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { }
/*-------------- HALF SCREEN ----------------*/
@media only screen and (min-device-width: 500px) and (max-width: 1000px) { }
/*-------------- FULL SCREEN ----------------*/
@media only screen and (min-width: 1001px) and (max-width: 1450px) { }
@headStyleColorRed
headStyleColorRed / Aws Docker install script
Last active July 31, 2020 16:29
Aws E-skeleton-login script
#!/bin/bash
# Updating server
sudo apt-get update
sudo apt-get upgrade
# Installing dependencies
sudo apt-get install -y curl vim
# Installing Docker
docker run -d --name my-go-git-server --publish 8022:22 --publish 3000:3000 --volume `pwd`/gogs-data/:/data hypriot/rpi-gogs-raspbian
# Regular Colors
Black="\[\033[0;30m\]" # Black
Red="\[\033[0;31m\]" # Red
Green="\[\033[0;32m\]" # Green
Yellow="\[\033[0;33m\]" # Yellow
Blue="\[\033[0;34m\]" # Blue
Purple="\[\033[0;35m\]" # Purple
Cyan="\[\033[0;36m\]" # Cyan
White="\[\033[0;37m\]" # White
#!/bin/bash
#
# This command shoud be run with "bash whatever.sh" instead of "sh whatever.sh"
# First generate key and make folder
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< y"" ;
# Create authorized_keys
touch ~/.ssh/authorized_keys
# Adds nice coloring to see the folders putting this on the bottom of ~/.bashrc
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '
LS_COLORS=$LS_COLORS:'di=0;36:' ; export LS_COLORS
# Discern if there are images and containers
docker ps -aq > containers.txt
docker images -q > images.txt
docker volume ls -q > volumes.txt
ARE_THERE_CONTAINERS=$(cat containers.txt | wc -l)
ARE_THERE_IMAGES=$(cat images.txt | wc -l)
ARE_THERE_VOLUMES=$(cat volumes.txt | wc -l)
if [ $ARE_THERE_CONTAINERS -gt 0 ]; then
# Remap prefix from 'C-b' to 'C-w'
unbind C-b
set-option -g prefix C-w
bind-key C-w send-prefix
# split panes using | and -
bind + split-window -h
bind - split-window -v
unbind '"'
unbind %
// ************************************************************************************************* //
//
// In order to upload a Smart contract we have to follow a series of steps:
//
// 1. Library imports
// a) solc: .sol file's extension compiler
// b) fs: Node native file reader
// c) web3: A new web3 instance that connects to Ganache's default port
//
// 2. Smart Contract compilation