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
import json | |
from functools import wraps | |
from flask import redirect, request, current_app | |
def support_jsonp(f): | |
"""Wraps JSONified output for JSONP""" | |
@wraps(f) | |
def decorated_function(*args, **kwargs): | |
callback = request.args.get('callback', False) | |
if callback: |
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
package initialsync | |
import ( | |
"bytes" | |
"context" | |
"encoding/hex" | |
"fmt" | |
"time" | |
"github.com/libp2p/go-libp2p-core/peer" |
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 | |
USER=$1 | |
PASS=$2 | |
usermod --password $(echo $PASS | openssl passwd -1 -stdin) $USER |
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
alert("clickjack"); |
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
0xadaf150b905cf5e6a778e553e15a139b6618bbb7 |
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
// jail.Send() expects to find the current message id in `status.message_id` | |
// (if not found message id will not be injected, and operation will proceed) | |
var status = { | |
message_id: '42' // global message id, gets replaced in sendTransaction (or any other method) | |
}; | |
var _status_catalog = { | |
commands: {}, | |
responses: {} | |
}; |
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
<script> | |
(function(window, undefined) { | |
window.esenio = window.esenio || {}; | |
window.esenio.url = 'https://events.esen.io'; | |
window.esenio.eventSlug = 'demo'; | |
window.esenio.widgetWidth = '100%'; | |
window.esenio.widgetHeight = undefined; | |
document.writeln('<script src="' + window.esenio.url + '/scripts/widget.js"><\/script>'); | |
}(window)); | |
</script> |
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 | |
# see http://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users/137173#137173 | |
# System-wide crontab file and cron job directory. Change these for your system. | |
CRONTAB='/etc/crontab' | |
CRONDIR='/etc/cron.d' | |
# Single tab character. Annoyingly necessary. | |
tab=$(echo -en "\t") |
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
# pagination.py | |
class Paginator(object): | |
def __init__(self, query, per_page): | |
"""Initialize a paginator. | |
Arguments: | |
- query -- queryset from pymongo or mongoengine | |
- per_page -- number of items per page |
NewerOlder