Skip to content

Instantly share code, notes, and snippets.

View joyoyoyoyoyo's full-sized avatar
🏴
supporting my community

Angel Ortega joyoyoyoyoyo

🏴
supporting my community
  • InterMedia Advertising
  • SoCal / Remote / LA / IE
View GitHub Profile
@4ndrej
4ndrej / SSLPoke.java
Last active April 10, 2026 13:12
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
@jaredwinick
jaredwinick / index.html
Created March 2, 2013 05:15
Z-Order Curve
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Z-Order Curve</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background: #fff;
@jaredwinick
jaredwinick / README.md
Last active January 3, 2026 20:39
Z-Order Curve with Query

Z-Order curves are used to encode multiple dimensions to one dimension while maintaining locality. This feature makes them useful for indexing multidimensional data such as geospatial data. In BigTable-like systems (Accumulo, HBase, Cassandra a z-order curve index can translate a bounding box query to a single range scan. As this example shows, sometimes the locality properties of the curve are very good and few points outside the bounding box are scanned. Other times though, many points outside the bounding box are scanned if using a single range.

This example was inspired by Mike Bostock's Quadtree example

@branquito
branquito / Terminal.sublime-settings
Created April 25, 2013 16:48
open git bash using `terminal` plugin for sublime
{
// The command to execute for the terminal, leave blank for the OS default
// On OS X the terminal can be set to iTerm.sh to execute iTerm
"terminal": "C:\\Windows\\System32\\cmd.exe",
// A list of default parameters to pass to the terminal, this can be
// overridden by passing the "parameters" key with a list value to the args
// dict when calling the "open_terminal" or "open_terminal_project_folder"
// commands
"parameters": ["/c sh --login -i"]
@idefixcert
idefixcert / JavaDeepCopyViaSerialization.java
Created April 28, 2013 12:26
Java DeepCopy via Serialization
public static <T> T deepCopy(T o) throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
new ObjectOutputStream(baos).writeObject(o);
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
return (T) new ObjectInputStream(bais).readObject();
}
@davidecavestro
davidecavestro / Main.java
Last active July 25, 2019 04:40
H2 serialization performance test
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
@scottmcclung
scottmcclung / csv.awk
Created July 8, 2013 00:28
AWK script for parsing and reconstructing CSV data files. Originally written by Lorance Stinson...I've just made a few tweaks to this for my own use.
#!/usr/bin/awk -f
########################### AWK CSV Parser ###########################
# #
# ********** This file is in the public domain. ********** #
# #
# Use this source in any way you wish. #
# Feedback and bug reports would be appreciated. #
# As would a note about what how you are using it. #
# #
@pgericson
pgericson / gender_first_names.csv
Last active May 11, 2020 17:28
Approved first names in Denmark, M = Male, F = Female, U = Unisex, source: http://www.familiestyrelsen.dk/samliv/navne/soeginavnelister/godkendtefornavne/advanced/
Abiola U
Acelya U
Ada U
Adama U
Addis U
Addison U
Adi U
Adian U
Aezha U
Agne U
@shijinkui
shijinkui / akka pi demo
Last active June 11, 2017 21:15
akka worker demo Pi.java
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package com.sohu.smc.worker;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
@jeresig
jeresig / cookiebot.js
Last active October 5, 2023 12:20
Simple bot for CookieClicker: http://orteil.dashnet.org/cookieclicker/ How to use: Paste the following into the JavaScript console in your browser and run it. To start the bot type: "CookieClicker.start();" to stop it do: "CookieClicker.stop();" (or just reload the page).
CookieClicker = {
start: function() {
this.clickInterval = setInterval(function(){
// Click the large cookie as fast as possible!
document.getElementById("bigCookie").click();
}, 1);
this.goldInterval = setInterval(function(){
// Click the golden cookie
var shimmer = document.getElementsByClassName("shimmer")[0];