Skip to content

Instantly share code, notes, and snippets.

View coderua's full-sized avatar
🇺🇦
Stand with Ukraine

Volodymyr Chumak coderua

🇺🇦
Stand with Ukraine
View GitHub Profile
@Mins
Mins / mysql_secure.sh
Last active May 31, 2024 14:19
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@qmmr
qmmr / learnThemByHeart.js
Last active February 6, 2018 09:59
Tips & Tricks of JavaScript
/* Collection by Marcin Kumorek © 2013 */
/* falsy values */
/*
null
undefined
''
0
NaN
false
@anatooly
anatooly / gist:3364496
Created August 15, 2012 23:04
Git pre-commit hook
#!/bin/bash
# Author: Anatooly <anatooly.com>
# Based on code by Nikolaos Dimopoulos
# Based on code by Remigijus Jarmalavicius
# Checks the files to be committed for the presence of print_r(), var_dump(), die()
# The array below can be extended for further checks
php_checks[1]="var_dump("
php_checks[2]="print_r("
@shiawuen
shiawuen / index.html
Created December 29, 2011 15:05
Sample to upload file by chunk
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>test upload by chunk</title>
</head>
<body>
<input type="file" id="f" />
<script src="script.js"></script>