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
Turn on | |
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /V HiberbootEnabled /T REG_dWORD /D 1 /F | |
Turn off | |
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /V HiberbootEnabled /T REG_dWORD /D 0 /F | |
https://www.tenforums.com/tutorials/4189-turn-off-fast-startup-windows-10-a.html |
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
#!/usr/bin/bash | |
# Download zeromq | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
# Unpack tarball package | |
tar xvzf zeromq-4.2.2.tar.gz | |
# Install dependency |
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
@echo off | |
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm -f %%i | |
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi -f %%i |
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
#clone myrepo | |
git clone https://github.com/gianpaolof/myrepo.git | |
#cd into the repo folder | |
cd myrepo | |
# Add the repo from where we will cherry-pick | |
git remote add remoterepo https://github.com/remotegianpaolof/remote.git | |
#fetch the branches |
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
Go to /usr/local/share/ca-certificates/ | |
Create a new folder, i.e. "sudo mkdir school" | |
Copy the .crt file into the school folder | |
Make sure the permissions are OK (755 for the folder, 644 for the file) | |
Run "sudo update-ca-certificates" | |
ref: https://askubuntu.com/questions/645818/how-to-install-certificates-for-command-line/859887 | |
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/sh | |
alias dm='docker-machine' | |
alias dmx='docker-machine ssh' | |
alias dk='docker' | |
alias dki='docker images' | |
alias dks='docker service' | |
alias dkrm='docker rm' | |
alias dkl='docker logs' | |
alias dklf='docker logs -f' |
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 ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
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 inspect --format '{{.LogPath}}' $(docker ps --format '{{.ID}}') | xargs du -hs | sort -n (I have 5Gb of logs in that directory) |
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
C:\Users\\AppData\Local\Android\Sdk\emulator\emulator.exe -list-avds | |
Pixel_2_API_25 | |
C:\Users\\AppData\Local\Android\Sdk\emulator\emulator.exe @Pixel_2_API_25 -dns-server 8.8.8.8 |
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
//client | |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"crypto/tls" | |
) |
OlderNewer