Skip to content

Instantly share code, notes, and snippets.

View saiumesh535's full-sized avatar
🤒
so long

sai umesh saiumesh535

🤒
so long
View GitHub Profile
@saiumesh535
saiumesh535 / gist:2ff659b20777b8d8a6d3d548c88dcef6
Created February 27, 2020 05:17 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@saiumesh535
saiumesh535 / main.go
Created April 23, 2020 11:12
go routines example
package main
import (
"fmt"
"math/rand"
"sync"
"time"
)
// let's code some emitters
function Emitter(){
this.events = {};
}
export const emtr = new Emitter();
// on function to push events in array
@saiumesh535
saiumesh535 / react-cli.rs
Created September 1, 2020 13:56
react-cli.rs
use include_dir::{include_dir, Dir};
use std::fs::create_dir_all;
use std::path::Path;
use std::{time, io::prelude::*};
const PROJECT_DIR: Dir = include_dir!("./server");
fn main() {
let now = time::Instant::now();
let start_path = Path::new("temp");
@saiumesh535
saiumesh535 / main.go
Last active September 14, 2020 15:12
Go-redis
package main
import (
"bytes"
"fmt"
"log"
"net"
"strconv"
"sync"
)

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@saiumesh535
saiumesh535 / go-json.go
Created June 11, 2021 10:46
Golang JSON
package main
import (
"encoding/json"
"fmt"
"log"
"github.com/tidwall/gjson"
)
{"lastUpload":"2022-02-01T14:31:59.145Z","extensionVersion":"v3.4.3"}
@saiumesh535
saiumesh535 / index.js
Created February 2, 2022 05:08
Get Users in your GitHub Organisation
const axios = require('axios');
async function getMembers() {
try {
const resp = await axios.default.get('https://api.github.com/orgs/<org_name>/members', {
headers: {
'Accept': "application/vnd.github.v3+json",
"Authorization": "Bearer <token>"
}
});
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole