Skip to content

Instantly share code, notes, and snippets.

View ny8's full-sized avatar

ny8

View GitHub Profile
@jaeho0613
jaeho0613 / PayActivity.java
Created February 5, 2021 15:23
Kakao Pay - PayActivity.java
package com.jaeho;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
@r-rmcgibbo
r-rmcgibbo / prometheus-pushgateway
Created February 5, 2021 15:23
pr=112040 | system=x86_64-linux
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/9r0k3vrfqan3c2c6sikzy7mvdimlnzyf-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
@fredlahde
fredlahde / git-review.sh
Last active February 5, 2021 15:27
Git review
git-review() {
local search="$1"
local commits=$(git --no-pager log --all --oneline --grep=$search | cut -d ' ' -f1 | paste -sd ' ')
if [ -z "$commits" ]
then
echo "No commits found for $search"
else
git show --pretty=short --show-signature $(echo $commits) | vim -
fi
}
@Leemainsw
Leemainsw / generate-pushid.js
Created February 5, 2021 15:20 — forked from mikelehen/generate-pushid.js
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@compcon
compcon / pilot.txt
Created February 5, 2021 15:20
Ace - Davlahmin (LL:0)
{"id":"5e11467d-8d51-4f76-a29f-6e983f01520c","group":"Full Force Foward","sort_index":1,"isLocal":true,"cloudID":"","cloudOwnerID":"","gistCode":"","gistOwner":"e7e0788e-40cb-42a0-9475-aead513dc1db","lastSync":"1000-01-01T05:50:36.000Z","level":0,"callsign":"Ace","name":"Davlahmin ","player_name":"Dylan","status":"Active","dead":false,"text_appearance":"<p>Suffered two broken arms during time as a starfighter pilot in times of unrest. Physical strength is less than optimal but reaction time is still good.<br><br>Suffered a broken ankle during a test flight. Occurred when Davlahmin was exiting the ship used for testing, he fell down the steps of the experimental ship.</p><p>Due to stress from various battles and skirmishes over the years, he is extremely hostile and prone to major fits of anxiety out of the cockpit. <br><br>Has trouble bonding with people due to past experiences of losing loved and or trusted ones during high stress situations.</p>","notes":"","history":"<p>I have piloted many vessels in my ti
@jaeho0613
jaeho0613 / MainActivity.java
Created February 5, 2021 15:20
Kakao Pay - MainActivity.java
package com.jaeho;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
@Prathmeshp20
Prathmeshp20 / Practiced4.ipynb
Created February 5, 2021 15:20
Untitled7.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dominiksimgen
dominiksimgen / read_jason.py
Created February 5, 2021 15:20
how to read and write to JSON files with Python
import json, os
here = os.path.dirname(os.path.abspath(__file__))
os.chdir(here)
f = open("database/locations.json", "r") # open the JSON with read access
data = json.load(f)
f.close()
#do here something with the "data" object like reading and manipulating data
@chewwt
chewwt / i3-gaps.sh
Last active February 3, 2023 15:00 — forked from dabroder/i3-gaps.sh
Install i3-gaps on ubuntu 20.04
#!/bin/bash
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev libxcb-xrm-dev
cd /tmp
# clone the repository
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
# compile & install