Skip to content

Instantly share code, notes, and snippets.

View ryzalyusoff's full-sized avatar
🛠️
Building Reader Mode

Ryzal Yusoff ryzalyusoff

🛠️
Building Reader Mode
View GitHub Profile
@ryzalyusoff
ryzalyusoff / publickey-git-error.markdown
Created September 8, 2020 20:25 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th
@ryzalyusoff
ryzalyusoff / google-translate-options.html
Created October 15, 2019 22:14
Google Translate Language Codes as dropdown options
<select>
<option value="af">Afrikaans</option>
<option value="sq">Albanian</option>
<option value="ar">Arabic</option>
<option value="az">Azerbaijani</option>
<option value="eu">Basque</option>
<option value="bn">Bengali</option>
<option value="be">Belarusian</option>
<option value="bg">Bulgarian</option>
<option value="ca">Catalan</option>
@ryzalyusoff
ryzalyusoff / wget.sh
Created October 10, 2019 13:00 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@ryzalyusoff
ryzalyusoff / mysql_downgrade.txt
Created June 23, 2018 00:27 — forked from 6temes/mysql_downgrade.txt
Downgrade MySQL version with brew
# Kill rails server and guard
bin/spring stop
brew services stop mysql
brew uninstall mysql
brew install [email protected]
brew link [email protected] --force
brew services start [email protected]
rbenv uninstall 2.3.3
rbenv install 2.3.3
gem install bundle

Keybase proof

I hereby claim:

  • I am ryzalyusoff on github.
  • I am ryzalyusoff (https://keybase.io/ryzalyusoff) on keybase.
  • I have a public key ASAxAMRNbvI9eDlbTpiSfDd5mD4dyyM6RDQTAq2Cfs2Q1Qo

To claim this, I am signing this object:

@ryzalyusoff
ryzalyusoff / facebook_avatars.html
Last active April 7, 2017 21:57
Generate random avatars from Facebook users
<html>
<body>
<script>
function getRandomInt() {
return Math.floor(Math.random() * (10000 - 5)) + 4;
}
for(var i=0; i<100; i++) {
imgUrl = "http://graph.facebook.com/v2.5/" + getRandomInt() + "/picture?height=200&height=200";
elem = document.createElement("img");
elem.setAttribute("src", imgUrl);
@ryzalyusoff
ryzalyusoff / keymap.cson
Created January 31, 2017 00:55
Assign "cmd+shift+F" to toggle between search pane on Atom
# Assign "cmd+shift+F" to toggle between search pane on Atom
# To open this keymap.cson, go to Atom on menu bar > Keymap
'atom-workspace':
'cmd-F': 'project-find:toggle'
'cmd-f': 'find-and-replace:toggle'
# Or if you want to assign on specific platform use:
#'.platform-darwin':
# 'cmd-F': 'project-find:toggle'
# 'cmd-f': 'find-and-replace:toggle'