Skip to content

Instantly share code, notes, and snippets.

@shiv19
shiv19 / gradientActionbarIosNativeScript.js
Last active April 17, 2021 09:21
use this code with loaded event of a page to get gradient actionbar on iOS for NativeScript Apps
import { Frame } from '@nativescript/core/ui/frame';
import { Color } from '@nativescript/core/color';
import { isIOS } from '@nativescript/core/platform';
/*
// Legacy require statements if using Vanilla {N}
const Frame = require('@nativescript/core/ui/frame').Frame;
const Color = require('@nativescript/core/color').Color;
const isIOS = require('@nativescript/core/platform').isIOS;
*/
@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@kakha13
kakha13 / Select Older than 1 day rows
Last active December 28, 2015 23:19
Select from Table row from user that was recorded more than one day ago.
-- BY Kakha Giorgashvili
-- Select Older than 1 day rows
SELECT
*
FROM
column_name
WHERE
USER = '1234'
AND added_time < DATE_ADD(NOW(), INTERVAL - 1 DAY)
@kakha13
kakha13 / Rating System Query
Last active December 28, 2015 23:19
100% cool rating system query for SQL that will give you right result. Score and Timer calculation Rating
-- BY Kakha Giorgashvili (KAKHA13)
-- Rating system query
-- score = Users Score
-- timer = Interval from begining to end
-- 1.8 is gravity what helps query to get 100% right result
SELECT
*,
(`score` - 1) / POWER(`timer`, 1.8) AS rating
FROM
@iraSenthil
iraSenthil / gist:3222887
Created August 1, 2012 02:20
Restart ADB in single command
cmd /c “adb kill-server&&adb start-server”