Skip to content

Instantly share code, notes, and snippets.

View vitqst's full-sized avatar
🎯
Focusing

vitqst

🎯
Focusing
View GitHub Profile
# Trading classic - show all activity
document.querySelector('div[name=trades]').remove()
document.querySelector('div[name=marketActivity]').style.gridArea = 'inherit'
document.querySelector('div[name=marketActivity]').childNodes[1].firstElementChild.style.height = 'inherit'
[{"name":"RVN","volume":300,"price":0.16326},{"name":"RVN","volume":2428,"price":0.17216},{"name":"RVN","volume":1273,"price":0.16453},{"name":"RVN","volume":1273,"price":0.16453}]
function buildArray(n) {
const arr = [];
for (let i = 0; i < n; i++) {
arr.push(i);
}
}
function buildArray2(n) {
const arr = new Array(n).fill(0);
for (let i = 0; i < n; i++) {
arr[i] = (i);
// F12 & paster to use Ctrl+Z & Ctrl+Y for google keep draw
function KeyPress(e) {
var evtobj = window.event? event : e
if (evtobj.keyCode == 90 && evtobj.ctrlKey) {
document.querySelector("#canvas-parent > div.above-ink-canvas > div > div > div.ink-toolbar-end > div:nth-child(1) > button").click()
}
if (evtobj.keyCode == 89 && evtobj.ctrlKey) {
document.querySelector("#canvas-parent > div.above-ink-canvas > div > div > div.ink-toolbar-end > div:nth-child(2) > button").click()
}
@vitqst
vitqst / clean_html.php
Created August 28, 2018 07:11 — forked from xeoncross/clean_html.php
Sanitize HTML using PHP and the DOMDocument
<?php
/**
* Clean HTML string removing all element attributes and elements which are
* not in the provided whitelist (but keeping their allowed children).
*
* @see https://github.com/alixaxel/phunction/blob/master/phunction/HTML.php
* @param string $html to clean
* @param array $whitelist
*/
function clean_html($html, array $whitelist)
var gulp = require('gulp');
var babel = require('gulp-babel');
var babelify = require('babelify');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var del = require('del');
var vinylPaths = require('vinyl-paths');
// Here You can type your custom JavaScript...
$('.home_right_column').each(function() {
$(this).remove();
});
$( "a:contains('Sponsored')").closest('[id^="hyperfeed_story"]').each(function(){
$(this).remove();
});
@vitqst
vitqst / japan_regex.php
Created October 2, 2017 07:56
This is regex for who looking for regex japan text -->
<?php
#### DEFINE ####
const REGEX_JAPAN_TEXT =
'/[^\x{3041}-\x{3096}' . // Hiragana
'\x{3400}-\x{4DB5}\x{4E00}-\x{9FCB}\x{F900}-\x{FA6A}\x{2E80}-\x{2FD5}' . // Kanji
'\x{FF5F}-\x{FF9F}' . // Katakana (Half Width)
'\x{30A0}-\x{30FF}]/u'; // Katakana (Full Width)
const REGEX_HIRAGANA = '/[^\x{3041}-\x{3096}]/u';
const REGEX_KANJI = '/[^\x{3400}-\x{4DB5}\x{4E00}-\x{9FCB}\x{F900}-\x{FA6A}\x{2E80}-\x{2FD5}]/u';
const REGEX_KATAKANA_HALF = '/[^\x{FF5F}-\x{FF9F}]/u';
/**
* This code will be remove your friend from list without unfriend him/her
* <your_friend_id>
*/
setTimeout(function(){
$('li[data-id="<your_friend_id>"]').remove();
console.log('Remove Liinh From Your Friend');
}, 1000);
<?php
generalData();
function generalData()
{
$id = 26;
$max = 100000000000000000000;