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
############################### | |
# _ # | |
# | |_ _ __ ___ _ ___ __ # | |
# | __| '_ ` _ \| | | \ \/ / # | |
# | |_| | | | | | |_| |> < # | |
# \__|_| |_| |_|\__,_/_/\_\ # | |
# # | |
############################### | |
############################################################################ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Arduino Controller</title> | |
</head> | |
<body background="http://www.wallpapersonview.com/wallpapers/4/abstract_colorful_textures_widescreen_desktop_background_picture-371.jpg"> | |
<div class="page-header" align="center"> | |
<h1 style="color: white">Pumper Controller</h1> | |
<h4 id="timer" style="color: white">Running time: 0 (s)</h4> |
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
Because of 'Meslo for Powerline' font doens't work with Putty. | |
So we need another patched font to display powerline correctly. | |
Here are the list: | |
- DejaVu Sans Mono for Powerline (https://github.com/powerline/fonts/tree/master/DejaVuSansMono) | |
- Droid Sans Mono for Powerline (https://github.com/powerline/fonts/tree/master/DroidSansMono) | |
To change font: On main window (Putty Configuration) -> Window -> Apearance -> Font settings -> Change | |
To test, enter this in the terminal screen: echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699" |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll] | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell] | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open] | |
“MuiVerb”=”@photoviewer.dll,-3043” | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command] | |
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ | |
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\ | |
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\ | |
00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\ |
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
int getMax(int a, int b) { | |
return ((a + b) + abs(a - b))/2 | |
} |
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
public class VasgateParser { | |
private static final Logger log = LoggerFactory.getLogger(VasgateParser.class); | |
private final String fileName; | |
private static final int INDEX_OF_PHONE_NUMBER = 0; | |
public VasgateParser(String fileName) { | |
this.fileName = fileName; | |
} |
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
# The vboxmanage is located at: | |
\path\to\virtualbox (example: ..\Oracle\VirtualBox) | |
# Clone a virtual machine (with Virtual Machine name) to specific folder: | |
vboxmanage clonevm Funix --basefolder D:\VMWare |
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
Backup: sudo tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/boot --one-file-system / | |
Restore: sudo tar -xvpzf /path/to/tar/file -C / --numeric-owner |
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
Network Interface Configurator. | |
- View network settings of an ethernet adapter: | |
ifconfig eth0 | |
- Display details of all interfaces, including disabled interfaces: | |
ifconfig -a | |
- Disable eth0 interface: | |
ifconfig eth0 down |
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
Get the system information (OS version): cat /etc/*-release | |
Lists open files and the corresponding processes: lsof -i :port | |
Get PID of the process which is running on specific port: netstat -nlp | grep "port" | |
Get the path of specific PID: ps -fp pid | |
Get the public ip: curl httpbin.org/ip | |
Read Realtime log: tailf /path/to/file | |
Get directory structure: tree /directory | |
Move to previous directory: cd - (actually it is $OLDPWD environment path) | |
Copy ssh public key to server: ssh-copy-id user@ip_address | |
Execute a command repeatedly: watch 'command' |
OlderNewer