Skip to content

Instantly share code, notes, and snippets.

0x05f37c67a0ff5023feae3c76bc660251a78a4597eb5de119b9a4d3c7a9c93377

@yagopv
yagopv / index.html
Last active January 28, 2022 12:31
third-party-cookies-test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Third Party Cookies Test</title>
</head>
<body>
@yagopv
yagopv / NFT
Created November 4, 2021 20:53
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "My first NFT"
},
"description": {
"type": "string",
SOL_RESET_PASSWORD_FORM_URL,
EXCHANGE_AUTH_CODE_URL,
var Participant = function(name) {
this.name = name;
this.chatroom = null;
};
Participant.prototype = {
send: function(message, to) {
this.chatroom.send(message, this, to);
},
receive: function(message, from) {
var Participant = function(name) {
this.name = name;
this.chatroom = null;
};
Participant.prototype = {
send: function(message, to) {
this.chatroom.send(message, this, to);
},
receive: function(message, from) {
class EventEmitter {
constructor() {
this.events = {};
}
emit(eventName, data) {
const event = this.events[eventName];
if( event ) {
event.forEach(fn => {
fn.call(null, data);
@yagopv
yagopv / gist:197803ef637d7d047b6cc9ff8594f6bd
Created August 19, 2016 13:17
animate source to target
var $start = $($('img')[2]).clone();
var $end = $('img')[0];
var rectStart = $($('img')[2])[0].getBoundingClientRect();
var rectEnd = $end.getBoundingClientRect();
$start.css({
position: 'absolute',
top: rectStart.top + window.scrollY,
left: rectStart.left,
@yagopv
yagopv / SingletonHelper
Last active August 29, 2015 14:08
Singleton Helper for Android
public class SingletonHelper {
private static SingletonHelper instance;
private static Context mContext = null;
public static SingletonHelper getInstance(Context context)
{
if (instance == null) {
instance = new SingletonHelper(context);
} else {
@yagopv
yagopv / gist:8557026
Created January 22, 2014 11:12
Order array Javascript
// Simple
array.sort(function(a,b){
a = new Date(a.date);
b = new Date(b.date);
return a<b?-1:a>b?1:0;
});
// Generic
(function(){
if (typeof Object.defineProperty === 'function'){