Skip to content

Instantly share code, notes, and snippets.

@charsyam
charsyam / timebased_otpcode_generator.go
Created January 13, 2021 13:54
Go Timebased OTP Code Generator
package main
import (
"crypto/rand"
"crypto/hmac"
"crypto/sha1"
"encoding/base32"
"time"
"fmt"
)
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active September 19, 2024 12:38
Building a react native app in WSL2
@Harold2017
Harold2017 / github_actions_golang.md
Created September 16, 2019 09:56
github actions golang, build, test, codecov

build

name: build
on: [push]
jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
@raihan2006i
raihan2006i / Gemfile
Created May 6, 2019 12:30 — forked from UsamaAshraf/Gemfile
N+1 Queries, Batch Loading and Active Model Serializers
# ...
# https://github.com/exAspArk/batch-loader
gem 'batch-loader'
@ninanung
ninanung / ReactAndFCM.md
Last active August 17, 2023 00:20
React에서 FCM을 사용해봅시다.

React에서 FCM사용하기

이 글을 이해하기 위한 선행지식

  • React
  • NPM
  • curl이나 request모듈과 같은 요청관련 지식
  • Javascript에 대한 지식
  • FCM은 https혹은 localhost에서만 동작하며 http에서는 동작하지 않습니다.

많은 회사들이 웹앱을 구축할 때 React를 사용하고 있습니다. 솔직히 우리나라는 아직도 frontend 프레임워크보다는 전통적인 방식의 웹을 선호하는 경향이 있는 것 같지만 스타트업과 같은 많은 젊은 회사들이 React를 사용합니다. 그럴 경우 빠른 웹 구축을 위해 Google이나 AWS의 서비스를 많은 사용하는데요, FCM도 push notification을 빠르게 구축할 수 있게 해주는 Firebase 서비스의 하나입니다. 이름부터 Firebase Cloud Messaging(FCM)이죠. 이 글을 통해서는 아주 간단한 알림서비스 구축에 대해서 다뤄보도록 하겠습니다. 천천히 한번 알아보도록 하죠.

@serithemage
serithemage / aws-study-resource.md
Last active August 29, 2024 07:18
AWS 학습 자료집

AWS 학습 링크집 시리즈

@itamarhaber
itamarhaber / setbitrange.lua
Last active September 30, 2021 17:03
A somewhat optimized scripted approach to complementing Redis with a `SETBITRANGE` command
--[[
Sets a bitmap range
Bitmaps are stored as Strings in Redis. A range spans one or more bytes,
so we can call `SETRANGE` when entire bytes need to be set instead of flipping
individual bits. Also, to avoid multiple internal memory allocations in
Redis, we traverse in reverse.
Expected input:
KEYS[1] - bitfield key
@niw
niw / fetch_nike_puls_all_activities.bash
Last active August 11, 2024 16:27
A simple NikePlus API description to fetch past run metrics
#!/usr/bin/env bash
# fetch_nike_puls_all_activities.bash
# A simple bash script to fetch all activities and metrics from NikePlus.
# See `nike_plus_api.md` for the API details.
readonly bearer_token="$1"
if [[ -z "$bearer_token" ]]; then
echo "Usage: $0 bearer_token"
exit
@kyo504
kyo504 / AndroidManifest.xml
Last active July 17, 2020 13:20
Android native module
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eegoma.RNAudioPlayer">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true">
</application>
</manifest>
@phansch
phansch / yardoc_cheatsheet.md
Last active September 22, 2024 02:17 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet