This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--uc-bg-color: #1a1e26; | |
--uc-show-new-tab-button: none; | |
--uc-show-tab-separators: none; | |
--uc-tab-separators-color: none; | |
--uc-tab-separators-width: none; | |
--uc-tab-fg-color: #fff; | |
} | |
#titlebar { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PORT=4572 | |
# Ping Localstack up to 10 times every 0.5s. | |
# Using docker-wait wouldn't work as the server | |
# runs as blocking process and never terminates. | |
echo "Waiting for Localstack to be up..." | |
while ! nc -z localhost $PORT; do | |
sleep 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chart.defaults.LineWithLine = Chart.defaults.line; | |
Chart.controllers.LineWithLine = Chart.controllers.line.extend({ | |
draw: function(ease) { | |
Chart.controllers.line.prototype.draw.call(this, ease); | |
if (this.chart.tooltip._active && this.chart.tooltip._active.length) { | |
var activePoint = this.chart.tooltip._active[0], | |
ctx = this.chart.ctx, | |
x = activePoint.tooltipPosition().x, | |
y = activePoint.tooltipPosition().y, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name gallery-file-browser | |
// @namespace https://gist.github.com/RoxasShadow/2d6ab73a9dc6515dc905224911c175b4 | |
// @description File browser becomes an image gallery | |
// @include file:* | |
// @author RoxasShadow | |
// @version 1 | |
// @grant none | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
im = "C:\\Program Files\\ImageMagick-7.0.7-Q16\\magick.exe" | |
c2t = "H:\\Users\\Giovanni\\Downloads\\Capture2Text_v4.5.1_64bit\\Capture2Text_CLI.exe" | |
Dir.mkdir('res') unless Dir.exists?('res') | |
require 'thread/pool' | |
pool = Thread.pool(8) | |
Dir['*.png'].each do |f| | |
pool.process { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.19; | |
library SafeMath { | |
function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
uint256 c = a + b; | |
assert(c >= a); | |
return c; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puzzle = <<-EOF | |
5 1 9 5 | |
7 5 3 | |
2 4 6 8 | |
EOF | |
puzzle.lines.map { |l| l.split.map(&:to_i).minmax.inject(:-).abs }.inject(:+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Day2 { | |
uint constant SPACE = 32; | |
uint constant NEW_LINE = 10; | |
bytes public b; | |
uint[] public stack; | |
function Day2() public { | |
string memory puzzle = "5 1 9 5\n7 5 3\n2 4 6 8"; | |
b = bytes(puzzle); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Day2 { | |
uint constant SPACE = 32; | |
uint constant NEW_LINE = 10; | |
bytes public b; | |
uint[] public stack; | |
function Day2() public { | |
string memory puzzle = "5 1 9 5\n7 5 3\n2 4 6 8"; | |
b = bytes(puzzle); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter HQ images | |
// @namespace https://gist.github.com/RoxasShadow/031eda7f62d09bc8d61d1d5739038329 | |
// @description Replace all the images with their HQ version | |
// @include https://twitter.com/* | |
// @author Roxas Shadow | |
// @version 1 | |
// @grant none | |
// @run-at document-idle | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js |
NewerOlder