This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct s_color | |
{ | |
int r_color; | |
int g_color; | |
int b_color; | |
} t_color; | |
typedef struct s_resolution | |
{ | |
int width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Updating server | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Installing dependencies | |
sudo apt-get install -y curl vim | |
# Installing Docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-------------- 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) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --name my-go-git-server --publish 8022:22 --publish 3000:3000 --volume `pwd`/gogs-data/:/data hypriot/rpi-gogs-raspbian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 % |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ************************************************************************************************* // | |
// | |
// 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 |
OlderNewer