Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / 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 / 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 / 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"

Moving Files with SharePoint Online REST APIs in Microsoft Flow

About

This is an overview of how to move files with Microsoft Flow using the SharePoint - Send an HTTP request to SharePoint action and SharePoint Online REST APIs.

These SharePoint Online REST APIs can be used outside of Flow, but you will need to handle authentication and provide an X-RequestDigest header with any POST requests (as with any SP REST POST request).

In the case of Flow's SharePoint - Send an HTTP request to SharePoint action, authentication is handled for you and you do not need to provide the X-RequestDigest header.

@Royalone94
Royalone94 / README.md
Created October 4, 2019 14:52 — forked from luciopaiva/_Full-socketio-client-and-server-example.md
Full socket.io client and server example

Full socket.io client and server example

To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.

How to use

Create a folder, run npm init -f on it and paste both server.js and client.js there (see files below). Needless to say, you must have Node.js installed on your system.

Install the required libraries:

@Royalone94
Royalone94 / index.js
Created October 3, 2019 17:06 — forked from akexorcist/index.js
Axios post method requesting with x-www-form-urlencoded content type
const axios = require('axios')
const qs = require('querystring')
...
const requestBody = {
name: 'Akexorcist',
age: '28',
position: 'Android Developer',
description: 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/',