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
<style> | |
#log { | |
position: fixed; | |
z-index: 9999999999999999999999; | |
bottom: 5px; | |
right: 5px; | |
left: 5px; | |
padding: 10px; | |
box-shadow: 0 0 3px rgba(0, 0,0, .2); | |
background: #333; |
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 removeTone(str, isCaseSensitive = false) { | |
let formatted = isCaseSensitive ? str : str.toLowerCase(); | |
formatted = formatted.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, 'a'); | |
formatted = formatted.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, 'e'); | |
formatted = formatted.replace(/ì|í|ị|ỉ|ĩ/g, 'i'); | |
formatted = formatted.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, 'o'); | |
formatted = formatted.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, 'u'); | |
formatted = formatted.replace(/ỳ|ý|ỵ|ỷ|ỹ/g, 'y'); | |
formatted = formatted.replace(/đ/g, 'd'); |
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
const functions = require('firebase-functions'); | |
// // Create and Deploy Your First Cloud Functions | |
// // https://firebase.google.com/docs/functions/write-firebase-functions | |
// | |
// exports.helloWorld = functions.https.onRequest((request, response) => { | |
// response.send("Hello from Firebase!"); | |
// }); | |
// Import the Firebase SDK for Google Cloud Functions. |
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
STEP 1 | |
Perform full installation of C++ Build Tools 2015 (from: https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcing-the-official-release-of-the-visual-c-build-tools-2015/) | |
(I say full install because this is what I did, however I don't claim that the full install is necessary) | |
Note: this may take a while as the full program is over 4GB | |
STEP 2 | |
Install Python 2.7.11 (from: https://www.python.org/) | |
Note: during installation select the "add to PATH" option (which is not selected by default) | |
STEP 3 |
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
<!-- | |
This code will translate page contents automatically (without user input) | |
Settings located at line 9, current script will translate english to estonian | |
--> | |
<style>#google_translate_element,.skiptranslate{display:none;}body{top:0!important;}</style> | |
<div id="google_translate_element"></div> | |
<script> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'et', autoDisplay: false}, 'google_translate_element'); | |
var a = document.querySelector("#google_translate_element select"); |
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 Steam Queue Auto Discoverer | |
// @description Discover the Steam queue three times to get the sale cards | |
// @version 2.3.0 | |
// @namespace https://gist.github.com/xPaw/73f8ae2031b4e528abf7 | |
// @icon https://store.steampowered.com/favicon.ico | |
// @match https://store.steampowered.com/explore* | |
// @grant none | |
// ==/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
/** | |
* Generate password regex | |
* @method generatePasswordRegex | |
* @param {Number} min Minimum length of password | |
* @param {Number} max Maximum length of password | |
* @param {String} specialCharacter List of special characters | |
* @param {Number} specialLength Number of required special character in password | |
* @param {Number} uppercaseLength Number of required uppercase character in password | |
* @param {Number} numberLength Number of digit character in password * | |
*/ |
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
$('#query').keydown2(function () { | |
console.log($(this).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
/** | |
* Bob Math utilities | |
* @author: ducdhm | |
* @created: Tue, Feb 11th, 2014 (GTM+7) | |
*/ | |
(function(Math) { | |
/** | |
* Find the number of decimal places | |
* @method findDec | |
* @param {Float|Number} dec |
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
@echo off | |
:: Path to Sublime Text installation dir. | |
SET stPath=%~dp0sublime_text.exe | |
SET stPathOnly=%~dp0 | |
:: Key name for the registry entries. | |
SET UserEntry=Sublime Text | |
SET AdminEntry=Sublime Text As Admin | |
:: Context menu texts. | |
SET "UserMenuText=Open with Sublime(&-)" | |
SET "AdminMenuText=Open with Sublime As Admin(&+)" |
NewerOlder