Skip to content

Instantly share code, notes, and snippets.

@correosdelbosque
correosdelbosque / README.md
Created December 4, 2019 06:29
How to speed up Google Chrome (or Chromium) browser

How to speed up Google Chrome (or Chromium) browser

  1. Go to chrome://flags/
  2. Enable these flags:
    • Override software rendering list
    • GPU rasterization
    • Zero-copy rasterizer
    • Number of raster threads (set it to the maximum value)

Before:

/*CONFIGURABLE*/
var baseBet = 2;//This is your base bet, you can change it.
var crashOnNormalMode = 1.75;//This is what the bets will crash on in normal mode
var normalModeLostMultiply = 2;//Bet on normal mode will multiply by this when lost
var normalModeWinMultiply = 0.75;//Bet on normal mode will mutliply by this when wins
var chaserMultiplyOnLose = 1.3;//Bet will multiply by this in chaser mode on loss
// ==UserScript==
// @name CoinBrawlAutomaton
// @description Вкачиваем натыренное золото по статам
// @author Gourytch
// @license WTFPL
// @version 1.1
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @include https://coinbrawl.com/*
// @include https://www.coinbrawl.com/*
// @grant GM_getValue
@correosdelbosque
correosdelbosque / curl-output.txt
Created May 2, 2018 01:16 — forked from sehrgut/curl-output.txt
How to hijack a page via a <script> tag loading HTML. Real-world example in curl-output.txt.
HTTP/1.1 302 Found
Date: Sun, 03 Jan 2016 19:58:45 GMT
Server: Apache
X-Powered-By: PHP/5.4.45-0+deb7u2
Location: http://ww31.gvisit.com/record.php?sid=592101993e8b9913eb0462e5bd4d7501
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
HTTP/1.1 200 OK

Say your dataset is an array of numbers, and includes both positive and negative values. Use two scales to construct the bar chart: a quantitative scale (such as a [linear scale][1]) to compute the bar positions along the x-axis, and an [ordinal scale][2] with rangeBands to compute the bar positions along the y-axis.

For the quantitative scale, compute the data domain (the minimum and maximum value) using [d3.extent][3]:

var x = d3.scale.linear()
    .domain(d3.extent(data, function(d) { return d.value; }))
    .range([0, width]);

[Nicing][4] the scale will extend the extent slightly to the nearest round numbers. If you want the zero-value to be centered in the middle of the canvas, take the greater of the minimum and maximum value by magnitude, or simply hard-code the desired domain.

@correosdelbosque
correosdelbosque / 2048-circle.js
Created February 17, 2018 21:42 — forked from jacekd/2048-circle.js
2048 keys in circle moves
function mouseEvent(type, sx, sy, cx, cy) {
var evt;
var e = {
bubbles: true,
cancelable: (type != "mousemove"),
view: window,
detail: 0,
screenX: sx,
screenY: sy,
clientX: cx,

ブロックチェーン勉強会2

  • Thursday, May 26
  • AltCoin といわれるものから、その合意プロトコル的なものについていくつか紹介
  • TL;DR いっぱいありすぎてわかんねえ!

ブロックチェーンとは

ある事実なり履歴を改竄できない形で複製して保持する技術の総称

@correosdelbosque
correosdelbosque / private_access.cpp
Created October 29, 2016 06:42 — forked from dabrahams/private_access.cpp
Accessing Private Data
#include <iostream>
// This is a rewrite and analysis of the technique in this article:
// http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html
// ------- Framework -------
// The little library required to work this magic
// Generate a static data member of type Tag::type in which to store
// the address of a private member. It is crucial that Tag does not
@correosdelbosque
correosdelbosque / Protocol.txt
Created January 23, 2016 15:39 — forked from ripper234/Protocol.txt
How to decode messages stored in the Bitcoin blockchain with btcmsg
BTCmsg Protocol v1 (2011-09-18)
===============================
Each message is represented by multiple payment which is calculated by
the following algorithm:
1. Two first chars for message type ('01' for md5, '02' for ascii).
2. Then the message in hex (python binascii.hexlify).
3. Split the long string to groups of 4 hex digits.
4. Each group of 4 hex (e.g. 2 ascii letters from the message) is
represented by a payment in satoshi (maximum 0xffff=65535).
@correosdelbosque
correosdelbosque / google_speech2text.md
Created January 5, 2016 20:03 — forked from alotaiba/google_speech2text.md
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English