Skip to content

Instantly share code, notes, and snippets.

@hoatle
hoatle / eXo.js
Created February 24, 2012 05:00
eXo.provide(namespace, obj);
(function(w) {
w.eXo = w.eXo || {};
/**
* Exposes a function to attach its to a namespace, this is similar but more advanced than goog.provide(namespace)
*
* @param namespace the name space string, for example: "eXo.social.MyClass".
* @param obj the associated function or singleton object to be associated with this name space
*/
eXo.provide = function(namespace, obj) {
if (!namespace || !obj) {
@chris-belcher
chris-belcher / coinswap-design.md
Last active April 26, 2024 04:37
Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

25/5/2020

Abstract

Imagine a future where a user Alice has bitcoins and wants to send them with maximal privacy, so she creates a special kind of transaction. For anyone looking at the blockchain her transaction appears completely normal with her coins seemingly going from address A to address B. But in reality her coins end up in address Z which is entirely unconnected to either A or B.

Now imagine another user, Carol, who isn't too bothered by privacy and sends her bitcoin using a regular wallet which exists today. But because Carol's transaction looks exactly the same as Alice's, anybody analyzing the blockchain must now deal with the possibility that Carol's transaction actually sent her coins to a totally unconnected address. So Carol's privacy is improved even though she didn't change her behaviour, and perhaps had never even heard of this software.

@kri26
kri26 / index.css
Created April 29, 2021 18:43
Three.js - Load .OBJ ?
html, body {
margin: 0;
height: 100%;
}
#c {
width: 100%;
height: 100%;
display: block;
}
@kayot88
kayot88 / main.js
Created November 4, 2018 18:07
js copy obj (all types)
function deepClone(obj) {
var copy;
// Handle the 3 simple types, and null or undefined
if (null == obj || "object" != typeof obj) return obj;
// Handle Date
if (obj instanceof Date) {
copy = new Date();
copy.setTime(obj.getTime());
@b21827335
b21827335 / index.css
Created December 6, 2021 09:34
WebGL - load obj - cube
@import url("https://webglfundamentals.org/webgl/resources/webgl-tutorials.css");
body {
margin: 0;
}
canvas {
width: 100vw;
height: 100vh;
display: block;
}
@greggman
greggman / index.css
Created October 17, 2020 16:56
Load Obj - Stack Overflow
body { margin: 0; }
canvas { width: 100vw; height: 100vh; display block; }
@mgmacri
mgmacri / README.md
Last active April 26, 2024 04:32
WebGL - load obj - cube
@codewithgun
codewithgun / laravel-local-pusher.md
Created April 22, 2021 15:40
Laravel web socket with local pusher and custom authentication

Laravel local websocket

Customized authentication will be used in this gist instead of default Auth facade provided by Laravel

Create project

composer create-project laravel-laravel your-project-name
cd your-project-name
@dun4n
dun4n / vcard.html
Last active April 26, 2024 04:32
#JavaScript vcard generator example
<!doctype html>
<html>
<head>
<script type="text/javascript" src="vcard2.js"></script>
</head>
<body>
<script type="text/javascript">
// With helper methods
var fooBar = vCard.create(vCard.Version.FOUR)
fooBar.addFormattedname("Mr Foo Bar")
@shuradrozd
shuradrozd / script.js
Created July 21, 2017 15:51
obj Stack with methods
function Stack() {
collection = [];
this.print = function() {
console.log(collection);
return this;
};
this.push = function(elem) {