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
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); |
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
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,3) | |
if (!ACPI_SUCCESS(acpi_get_table_with_size(id, 0, &hdr, &tbl_size))) | |
#else | |
tbl_size = 0x7fffffff; | |
if (!ACPI_SUCCESS(acpi_get_table(id, 0, &hdr))) | |
#endif | |
{ | |
return KCL_ACPI_ERROR; | |
} | |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1) |
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
var httpProxy = require('http-proxy'), | |
fs = require('fs'); | |
console.log("proxy"); | |
var options = { | |
target: "https://localhost", | |
ssl: { | |
key: fs.readFileSync('./ssl/key.pem'), | |
cert: fs.readFileSync('./ssl/cert.pem') |
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
sudo apt-get install libcap2-bin | |
sudo setcap cap_net_bind_service=+ep /usr/local/bin/node |
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 | |
scale=3 | |
lbas=$(sudo smartctl --all /dev/sda | grep Total_LBAs_Written | awk '{print $(NF)}') | |
mbs=$(( $lbas / 2048 )) | |
# gbs=$(( $mbs / 1024.0 )) | |
gbs=$(bc -l <<< "scale=3 ; $mbs / 1024.0") | |
echo "LBAs written: $lbas" |
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 | |
sum_pages=0 | |
for file in *.pdf ; do | |
cur_pages=$(pdfinfo $file | awk '/Pages/{print $2}') | |
echo "pdf: $file has $cur_pages pages." | |
sum_pages=$(( sum_pages + cur_pages)) | |
done | |
echo "All pdf files in this directory have $sum_pages pages." |
NewerOlder