Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Carter Cole neopunisher

🎯
Focusing
View GitHub Profile
View payment.js
var EventSource = require("eventsource");
var es = new EventSource(
"https://horizon-testnet.stellar.org/accounts/GB7JFK56QXQ4DVJRNPDBXABNG3IVKIXWWJJRJICHRU22Z5R5PI65GAK3/payments",
);
es.onmessage = function (message) {
var result = message.data ? JSON.parse(message.data) : message;
console.log("New payment:");
console.log(result);
};
es.onerror = function (error) {
@neopunisher
neopunisher / ans_stellar_quest_nft.js
Last active May 22, 2021
Stellar quest nft solution
View ans_stellar_quest_nft.js
var data = require('./data.json'); #transaction with operations downloaded saved as json
var ops = data._embedded.records.map((r)=>[r.name, new Buffer.from(r.value, 'base64')])
var StellarSdk = require("stellar-sdk");
var server = new StellarSdk.Server("https://horizon-testnet.stellar.org");
var key = StellarSdk.Keypair.fromSecret(
#secret key here
);
@neopunisher
neopunisher / inject-react.js
Last active Jan 22, 2021
Pull react into the page
View inject-react.js
(function(inj){
inj('https://unpkg.com/react@16/umd/react.development.js').then(()=>inj('https://unpkg.com/react-dom@16/umd/react-dom.development.js')).then(()=>inj('https://unpkg.com/babel-standalone@6.15.0/babel.min.js')).then(function(){
var out=document.createElement("div");out.id='testing';
document.body.appendChild(out)
console.log('loaded babel')
Babel.registerPlugin('eval_wrapper', function eval_wrapper() { return {visitor: {
FunctionDeclaration(path) {
console.log('a func')
// debugger
},
@neopunisher
neopunisher / md5collext.sh
Created Jul 15, 2013
Test md5 hash collision and message extension
View md5collext.sh
wget http://marc-stevens.nl/research/md5-1block-collision/message1.bin
wget http://marc-stevens.nl/research/md5-1block-collision/message2.bin
md5sum *.bin
#008ee33a9d58b51cfeb425b0959121c9 message1.bin
#008ee33a9d58b51cfeb425b0959121c9 message2.bin
echo "some extra" > extra.txt
cat message1.bin extra.txt | md5sum
#c4dda4dbd429421349c0ca6172cc2e95
cat message2.bin extra.txt | md5sum
#c4dda4dbd429421349c0ca6172cc2e95
@neopunisher
neopunisher / sendemail.asp
Created Sep 27, 2011
Classic ASP send email
View sendemail.asp
sub sendemail(subject,body,sto)
Set objMessage = CreateObject("CDO.Message")
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.gmail.com"
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "no-reply@brandextract.com"
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "passwd" ' change thus
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
objMessage.Configuration.Fields.Update
View zip.php
function Zip($source, $destination)
{
if (!extension_loaded('zip') || !file_exists($source)) {
return false;
}
$zip = new ZipArchive();
if (!$zip->open($destination, ZIPARCHIVE::CREATE)) {
return false;
}
View learn.graphql
{
__type(name: "Node") {
name
kind
fields {
name
type {
kind
ofType {
name
View keybase.md

Keybase proof

I hereby claim:

  • I am neopunisher on github.
  • I am cartercole (https://keybase.io/cartercole) on keybase.
  • I have a public key ASCPIeW-of9tc6dFejusNKs7pFm2B-vR_G-fmCmSZVMPfQo

To claim this, I am signing this object:

View cheatsheet.sh
dd if=clean.txt of=outclean.txt conv=lcase
tr ' ' '\n'
tr -s ' '
chage -d 0 user
awk ' { if ( length > L ) { L=length} }END{ print L}'
tr '[:upper:]' '[:lower:]' < clean.txt > outclean2.txt
wc -l out*.txt
pstree -p
w
wget -mkEpnp
View gist:973e1274586ec53805e03e19d1e700c9
93126901297815151078288992669518296329218393850654840958127279229911535598978898481635657822531972453651883340618864736759734542679037288413645544246236468657813005590075680252114746033092465493223366471048615346938198314256353419369541307392862912693187785033844054069740144373254706726814612710750178624771990754917602298093521436484064007164284387402867130625133132836281563051896500940516375440328178636152123679634003876766266442445314985666400256314065685651584153149055968640618546932146414
https://tuppers-formula.tk/