Skip to content

Instantly share code, notes, and snippets.

Avatar
🌪️
Focusing

gokaybiz

🌪️
Focusing
View GitHub Profile
@hunsiri
hunsiri / my.cnf
Created Jun 26, 2020 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
View my.cnf
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
View mega.py
#! /usr/bin/python
# by pts@fazekas.hu at Tue Oct 11 13:12:47 CEST 2016
""":" #megapubdl: Download public files from MEGA (mega.nz).
type python2.7 >/dev/null 2>&1 && exec python2.7 -- "$0" ${1+"$@"}
type python2.6 >/dev/null 2>&1 && exec python2.6 -- "$0" ${1+"$@"}
type python2.5 >/dev/null 2>&1 && exec python2.5 -- "$0" ${1+"$@"}
type python2.4 >/dev/null 2>&1 && exec python2.4 -- "$0" ${1+"$@"}
exec python -- ${1+"$@"}; exit 1
View Preventing-Puppeteer-Detection.md

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',
@asukakenji
asukakenji / try_shiny_2.go
Last active Feb 17, 2020
Shortest GUI program written in Golang. It displays a window and exits when the "close" button of the window is clicked.
View try_shiny_2.go
// Shortest GUI program written in Golang.
// It displays a window and exits when the "close" button of the window is clicked.
package main
import (
"golang.org/x/exp/shiny/driver"
"golang.org/x/exp/shiny/screen"
// Despite that the package names have a "mobile" prefix,
// these packages works on desktop.
@miguelmota
miguelmota / index.js
Created Dec 20, 2016
Node.js equivalent of Python's if __name__ == '__main__'
View index.js
function main() {}
if (require.main === module) {
main();
}
View fts_chromeext_reverse.c
/**
* coder: kodo no kami
* face: www.facebook.com/hacker.fts315
* date: 21/04/2015
**/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv){
@mmcdaris
mmcdaris / go_build_man.md
Last active Dec 5, 2021
going through the go build command
View go_build_man.md

usage

go build: compiles the packages named by the import paths, along with their dependencies, the binary does not end up in $GOPATH/bin it gets created in the dirs

go build [-o output] [build flags] [packages]

If the [packages] are a list of .go files, build treats them as a list of source files specifying a single package.

@gerner
gerner / gist:8201345
Created Dec 31, 2013
Hex decoding/encoding
View gist:8201345
public class HexDecoder {
//lower ascii only
private static int[] HEX_TO_INT = new int[] {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //0-15
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //16-31
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //32-47
0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1, //48-63
-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, //64-79
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, //80-95
@henriquemoody
henriquemoody / http-status-codes.php
Last active Jan 6, 2022
List of HTTP status codes in PHP
View http-status-codes.php
<?php
/**
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
*
* You may also want a list of unofficial codes:
*
* 103 => 'Checkpoint',
* 218 => 'This is fine', // Apache Web Server
* 419 => 'Page Expired', // Laravel Framework
@ryanfitz
ryanfitz / golang-nuts.go
Created Dec 2, 2012
two ways to call a function every 2 seconds
View golang-nuts.go
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl