Skip to content

Instantly share code, notes, and snippets.


Ali Najafizadeh alinz

View GitHub Profile
alinz / react-native-notifications+3.3.4.patch
Last active Dec 17, 2020
A react-native-notifications patch for getting scheduled local notification working in Android
View react-native-notifications+3.3.4.patch
diff --git a/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/ b/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/
index f9c858b..94ea188 100644
--- a/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/
+++ b/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/
@@ -2,8 +2,8 @@
package com.wix.reactnativenotifications;
import android.content.Context;
View gist:1d67908ccff03ca2d80b86260cb82aef
type Claims struct {
AccountID string `json:"account_id"`
GroupID string `json:"group_id"`
// Encode
func (c *Claims) Encode(secretKey []byte) (string, error) {
const op = errors.Op("jwt.Claims.Encode")
View gist:92fd7b56d400b59bc584935ae0ce15b6
package config
import (
type Config struct {
alinz / Certificates.go
Created Nov 12, 2019 — forked from Mattemagikern/Certificates.go
Create x509 certificate chain using Golang. Root CA, Designated CA, server CA
View Certificates.go
package main
import (
alinz /
Created Nov 12, 2019
OPENSSL encrypt decrypt
openssl aes-256-cbc -in plain.txt -out plain.enc -k cool
openssl aes-256-cbc -d -in plain.enc -out plain.txt -k cool
alinz / PROFILE.MD
Created Nov 7, 2019
Golang Profiling commands


Generate Prfile data

go test -cpuprofile -memprofile -bench .

Visual Profile data

View model.ts
export class Model {
constructor(obj: any) {
for (let key in obj) {
this.unmarshal(toCamelCase(key), obj[key])
marshal(): any {
return Object.keys(this).reduce((obj: any, key: string) => {
obj[toSnakeCase(key)] = toJS(this[key])
alinz / Makefile
Created Sep 25, 2019
Compile Zig to WebAssembly and run it in Node.js
View Makefile
zig build-exe --name test.wasm -target wasm32-freestanding --release-small test.zig
View setup react project
// babel js
"plugins": [
"import", {
"libraryName": "antd",
"libraryDirectory": "es",
alinz / golang_tls_http.go
Created Jul 11, 2019
Share tls config with server and client in golang
View golang_tls_http.go
package main
import (