Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# The following will split a CSV (file.csv) into multiple parts of 1 million lines each | |
# with each part having its own header. | |
# | |
# PREFIX denotes the filename to use for the parts. A number will be added to the end. | |
tail -n +2 file.csv | | |
split -d -l 1000000 - --filter='sh -c "{ head -n1 file.csv; cat; } > $FILE"' PREFIX |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
import lombok.extern.slf4j.Slf4j; | |
import lombok.val; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.MediaType; | |
import org.springframework.web.filter.OncePerRequestFilter; | |
import org.springframework.web.util.ContentCachingRequestWrapper; | |
import org.springframework.web.util.ContentCachingResponseWrapper; | |
import javax.servlet.FilterChain; | |
import javax.servlet.ServletException; |
javascript: (function() { | |
/* | |
Adds download links to gifs on Giphy for easier mass download | |
jQuery if not already loaded. | |
*/ | |
if ('undefined'==typeof jQuery) { | |
script = document.createElement( 'script' ); | |
script.src = 'https://code.jquery.com/jquery-3.1.1.min.js'; | |
script.onload=getServers; | |
document.body.appendChild(script); |
taskkill /f /im explorer.exe | |
explorer.exe |
package main | |
import ( | |
"bytes" | |
"log" | |
"os" | |
"os/exec" | |
"syscall" | |
"github.com/cloudfoundry/gosigar/psnotify" |
#!/bin/bash | |
TMP_DIR="$(mktemp -d -t subshells.XXXXXXXXXX)" | |
function cleanup { | |
rm -rf "${TMP_DIR}" | |
} | |
trap cleanup EXIT | |
PIDS=() | |
for i in 1 2 3; do |
#!/bin/bash | |
convertToKb() { | |
data="$1" | |
unit="${data//[0-9]/}" | |
value="${data//[!0-9]}" | |
converted="ERROR" | |
case $unit in | |
k | K) | |
converted="$value" | |
;; |