Skip to content

Instantly share code, notes, and snippets.

/*
* cloudflare's email-decode.js
*
* (manually) "decrypted" by antipatico (github.com/antipatico)
*
* All Wrongs Reversed (Ↄ), 2018
*/
! function() {
"use strict";
@mix3d
mix3d / recursiveDeepCopy.js
Created August 8, 2018 21:18
Most Performant JS DeepCopy
// from https://jsperf.com/deep-copy-vs-json-stringify-json-parse/5
function recursiveDeepCopy(o) {
var newO, i;
if (typeof o !== 'object') {
return o;
}
if (!o) {
return o;
@fabiocolacio
fabiocolacio / sdl-joystick-polling.c
Created December 15, 2017 02:37
A demonstration of using SDL2 to poll the state of buttons and axes on a joystick
#include <SDL2/SDL.h>
// This program shows how to work with joysticks using SDL2.
// This example shows how to do it by manually polling the joystick
// rather than using the sdl event queue.
int main() {
// Initialize the joystick subsystem
SDL_Init(SDL_INIT_JOYSTICK);
// If there are no joysticks connected, quit the program
@jimmywarting
jimmywarting / readme.md
Last active April 29, 2025 08:29
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@mdonkers
mdonkers / server.py
Last active April 4, 2025 13:11
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@bmaupin
bmaupin / install-openjdk-6-ubuntu-16.sh
Last active December 22, 2023 12:11
Install openjdk-6-jdk on Ubuntu/Xubuntu 16.04
# NOTE: This is a hack and will downgrade the tzdata package.
# Better alternatives:
# - Use Azul Zulu build of OpenJDK 6 (https://www.azul.com/downloads/zulu/zulu-linux/ - make sure you enable the box labeled Older Zulu versions)
# - Install Java 6 directly from Oracle and install it manually (https://gist.github.com/bmaupin/16855ce1b2484c459f41ad836a7d3f2f)
wget http://launchpadlibrarian.net/235298493/openjdk-6-jdk_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298496/openjdk-6-jre_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298494/openjdk-6-jre-headless_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298487/openjdk-6-jre-lib_6b38-1.13.10-1_all.deb
wget http://launchpadlibrarian.net/250277191/tzdata_2016c-0ubuntu1_all.deb
@derhuerst
derhuerst / output.js
Created May 10, 2016 10:22
how fetch a GitHub user's stars
[
{
owner: 'bcoe',
repo: 'top-npm-users',
description: ':star: Generate a list of top npm users by based on monthly downloads.',
language: 'JavaScript',
isFork: false,
stargazers: 27,
watchers: 27
}
@joepie91
joepie91 / vpn.md
Last active May 6, 2025 08:30
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@jdsimcoe
jdsimcoe / base64.md
Created October 16, 2015 23:03
A guide to how to embed Base64 stuff in your web stuff.

HTML

Here is some code on how to embed Base64 in HTML:

JPEG

<img src="data:image/jpeg;base64,BASE64_STRING"/>

PNG

@mhitza
mhitza / psp_on_linux.md
Created October 8, 2015 02:37
How to connect your PSP on Linux

It should work by default when connected, however you might reach this page with the same issue I had, where you where missing a few essential steps.

  1. Be sure that your PSP is set into USB mode: Settings -> USB connection
  2. Be sure the kernel module usb-storage is enabled, you can check with sudo modinfo usb-storage and enable it with sudo modprobe usb-storage
  3. Reconnect your cable after trying any of the previous steps
  4. If it doesn't get automounted, run dmesg to find the device (on my local machine it's sdb as seen in the output) and mount it manually (prefered with your user access rights so you don't have to use sudo for file copy)