wget -E -H -k -K -N -p -P newfolder http://example.com/something
- A few websites
wget -E -H -k -K -N -p -P newfolder http://example.com/something http://example.com/stuff
#!/bin/sh | |
if [ ! -d .git ]; then | |
echo ERROR: Please run this in the root of the git repository | |
exit 1 | |
fi | |
cat > .gitignore <<'EOF' | |
# CVS global ignores | |
RCS |
import org.apache.log4j.Logger; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.io.PrintWriter; | |
import java.util.Arrays; | |
/** | |
* Created by thangpn7 on 12/15/2017 |
# Define some default values that can be overridden by system properties | |
app.layout.pattern=%d{ISO8601} [%t] %-5p %c{3}.%M(%F:%L) - %m%n | |
app.log.dir=logs/ | |
# Define root logger | |
log4j.rootLogger=DEBUG, CONSOLE, DRFA, ERROR | |
# | |
# Define Console appender | |
# | |
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender | |
log4j.appender.CONSOLE.Threshold=DEBUG |
/** | |
* Sample implementation of a Shutdownable object. | |
*/ | |
public class SampleImpl implements Shutdownable { | |
public static void main(String[] args) { | |
SampleImpl sample = new SampleImpl(); | |
// Make the JVM call our shutdown() method upon exit. | |
ShutdownHook.registerForShutdownHook(sample); |
Main: https://www.hanoicomputer.vn/mainboardgiga-h110m-s2pv/p31663.html (1.7)
RAM: https://www.hanoicomputer.vn/ram-avexir-core-series-8gb-1x8gb-ddr4-bus-2666mhz-1cow/p30192.html (1.7)
HDD: https://www.hanoicomputer.vn/hdd-toshiba-1tb-7200rpm-sata3-32m/p33864.html (1.2)
PSU: https://www.hanoicomputer.vn/antec-bp450s-450w/p33698.html (0.7)
VGA: https://www.hanoicomputer.vn/vga-card-asus-dual-gtx-1050ti-o4g-v2/p38060.html (4.4) or https://www.hanoicomputer.vn/vga-asus-ex-gtx1050-o2g-128bits/p35080.html (3.5)
Case:
#!/usr/bin/env bash | |
waitForProcessEnd() { | |
pidKilled=$1 | |
processedAt=`date +%s` | |
while kill -0 ${pidKilled} > /dev/null 2>&1; | |
do | |
echo -n "." | |
sleep 1; | |
if [ $(( `date +%s` - $processedAt )) -gt 60 ]; then |
#!/bin/bash | |
# Thanks goes to @pete-otaqui for the initial gist: | |
# https://gist.github.com/pete-otaqui/4188238 | |
# | |
# Original version modified by Marek Suscak | |
# | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" or even "1.2.3-beta+001.ab" |
#ifndef _CRC16_TABLE_H__ | |
#define _CRC16_TABLE_H__ | |
/* A table of the shortest possible alphanumeric string that is mapped by redis' crc16 | |
* to any given redis cluster slot. | |
* | |
* The array indexes are slot numbers, so that given a desired slot, this string is guaranteed | |
* to make redis cluster route a request to the shard holding this slot | |
*/ |
Download all packages with pip download -r requirements.txt
and copy them to the offline host.
Install them on the offline host with pip install --no-index --find-links /path/to/some/dir/ -r requirements.txt
If you manage environment with pipenv , create the requirements.txt file from Pipfile with pipenv lock -r