From https://github.com/eamodio/vscode-gitlens/blob/master/src/constants.ts
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
TypeScript 21 hrs 47 mins ████████████████▒░░░ 67.1% | |
Vue.js 6 hrs 21 mins ██████▓░░░░░░░░░░░░░ 19.6% | |
JSON 2 hrs 10 mins ████▒░░░░░░░░░░░░░░░ 6.7% | |
JavaScript 46 mins ███▒░░░░░░░░░░░░░░░░ 2.4% |
From: https://unix.stackexchange.com/questions/294600/i-cant-enable-swap-space-on-centos-7
Follow these steps, it works on DigitalOcean's droplets. I tested. Change the amount 4096 according to your need
yum install nano -y
sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
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
function closest(num, arr) { | |
let idx = 0 | |
let curr = arr[idx] | |
let diff = Math.abs(num - curr); | |
for (var val = 0; val < arr.length; val++) { | |
var newdiff = Math.abs(num - arr[val]) | |
if (newdiff < diff) { | |
diff = newdiff | |
curr = arr[val] | |
idx = val |
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
window.requestAnimationFrame = (function () { | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function (callback) { | |
window.setTimeout(callback, 1000 / 60); | |
}; | |
})(); |
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
CreateObject("Wscript.Shell").Run "cmd /c """"C:\Program Files\nodejs\node.exe"" ""C:\Users\Antho\AppData\Roaming\npm\node_modules\hotel\lib\daemon"" > ""C:\Users\Antho\.hotel\daemon.log""""", 0, true |
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
// Does a math equation on the bound value. | |
// Use @VALUE in your mathEquation as a substitute for bound value | |
// Operator order is parenthesis first, then Left-To-Right (no operator precedence) | |
public class MathConverter : IValueConverter | |
{ | |
private static readonly char[] _allOperators = new[] { '+', '-', '*', '/', '%', '(', ')' }; | |
private static readonly List<string> _grouping = new List<string> { "(", ")" }; | |
private static readonly List<string> _operators = new List<string> { "+", "-", "*", "/", "%" }; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace Utils | |
{ | |
public sealed class KeyboardHook : IDisposable |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
using System.Windows.Forms; | |
namespace Utils | |
{ | |
public delegate int keyboardHookProc(int code, int wParam, ref keyboardHookStruct lParam); |