Navigation Menu

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 / generate.js
Last active April 14, 2024 16:47
Generate secret key in NodeJS
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); });
@dehamzah
dehamzah / scp-cheatsheet.md
Last active December 11, 2023 10:26
SCP Cheatsheet

Basic Syntax

$ scp source_file_path destination_file_path

Uploading

Single file

@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 / 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 / .eslintrc
Created June 6, 2018 07:41
ES Lint Setup for React Native
{
"parser": "babel-eslint",
"env": {
"browser": true
},
"plugins": [
"react",
"react-native"
],
"ecmaFeatures": {