Skip to content

Instantly share code, notes, and snippets.

View dehamzah's full-sized avatar
🦉
Morning Owl

Dede Hamzah dehamzah

🦉
Morning Owl
View GitHub Profile
@dehamzah
dehamzah / now.json
Created April 14, 2020 14:46
now.json config url rewrite for react app
{
"name": "supertesting-test2",
"alias": "supertesting-test2.now.sh",
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@now/static-build"
}
],
@dehamzah
dehamzah / readme.md
Created April 14, 2020 14:34
Stop google bot crawling your web

in robots.txt

User-agent: *
Disallow: /

this will not allow the crawler access your website, will work if your web haven't been indexed.


@dehamzah
dehamzah / readme.md
Created April 12, 2020 10:10
react native 0.56.0 cannot find ios simulator in catalina

run this to debug available simulator

xcrun simctl list --json devices

basicly this json output is what react-native run-ios parse to find the matching simulator.


@dehamzah
dehamzah / script.sh
Created March 5, 2020 09:18
Generating new keystore
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
@dehamzah
dehamzah / run.sh
Last active June 30, 2020 15:39
Create read only mysql database user
# Login
$ mysql -u root -p
# Check privileges
$ SHOW GRANTS FOR 'read-only_user_name'@'%';
# Remove the privileges if any
$ REVOKE ALL PRIVILEGES ON database_name.* FROM 'read-only_user_name'@'%';
@dehamzah
dehamzah / .eslintrc
Created June 6, 2018 07:41
ES Lint Setup for React Native
{
"parser": "babel-eslint",
"env": {
"browser": true
},
"plugins": [
"react",
"react-native"
],
"ecmaFeatures": {
> $ gulp ⬡ 8.9.4 [±master ●●]
[07:03:45] Using gulpfile /media/dehamzah/ssd/projects/projects/bps-satu-data/satudata-mobile-ionic/gulpfile.js
[07:03:45] Starting 'sass'...
[07:03:45] Starting 'index'...
[07:03:45] Starting 'scripts'...
[07:03:45] Starting 'styles'...
[07:03:45] Starting 'clean-templates'...
[07:03:45] Starting 'clean-images'...
[07:03:45] Starting 'lib'...
info: Preening: ngCordova
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {