Skip to content

Instantly share code, notes, and snippets.

@Royalone94
Royalone94 / multiple_ssh_setting.md
Created August 10, 2021 09:19 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@Royalone94
Royalone94 / react-native-flatlist-load-more.js
Created March 8, 2022 16:03 — forked from FaiChou/react-native-flatlist-load-more.js
A demo for react-native FlatList with load more action
class Demo extends React.Component {
state = {
data: [],
refreshing: true,
last_id: 0,
}
onEndReachedCalledDuringMomentum = true
componentDidMount() {
this._refreshData();
}
@Royalone94
Royalone94 / gist:54ca1e8cf71364e2123146d738af9ea0
Created May 12, 2022 19:26 — forked from chuckwagoncomputing/gist:4234127
pbcopy ssh public key to your clipboard
#pbcopy < ~/.ssh/id_rsa.pub
#or
cat ~/.ssh/id_rsa.pub | pbcopy
@Royalone94
Royalone94 / mongodb.py
Created February 2, 2023 13:47 — forked from mattrobenolt/mongodb.py
Wrapper for pymongo to integrate nicer into Django with failover stuff
from pymongo import Connection
from pymongo.collection import Collection
from pymongo.errors import AutoReconnect
from django.conf import settings
from types import FunctionType
import functools
import time
@Royalone94
Royalone94 / killa
Created July 6, 2023 08:29 — forked from jossef/killa
python kill process by port
#!/usr/bin/env python
import subprocess
import sys
import re
import os
def get_pids(port):
command = "sudo lsof -i :%s | awk '{print $2}'" % port
pids = subprocess.check_output(command, shell=True)
@Royalone94
Royalone94 / macBuildScript.sh
Created December 21, 2023 13:27 — forked from AttilaBerczik/macBuildScript.sh
Build script for IOS CI/CD Pipeline
# Create build folder
cd
mkdir build
cd build
# Download repository from Bitbucket
git clone {your git repo}
cd {the name of your git repo}/
# Install dependencies