Skip to content

Instantly share code, notes, and snippets.

View nasermirzaei89's full-sized avatar
:octocat:
I Love Open Source

Naser Mirzaei nasermirzaei89

:octocat:
I Love Open Source
View GitHub Profile
<form action="https://formset.io/f/{formName}" method="post">
<label for="email">Email Address</label>
<input name="email" id="email" type="email">
<button type="submit">Submit</button>
</form>
@nasermirzaei89
nasermirzaei89 / nonsecret.sh
Last active April 27, 2023 03:56
Get decoded secret as yaml
#!/bin/bash
set -e
NAMESPACE=$1
SECRET_NAME=$2
CONTENT=$(kubectl get secret -n "$NAMESPACE" "$SECRET_NAME" -o json)
@nasermirzaei89
nasermirzaei89 / id_rsa.pub
Created August 31, 2020 19:18
Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7xEVG3+icx/fsVrS0G9yMDL0aa2o8qT+kL28jZl/7+ucNcz7IrZRcgQI9WErlT7Z+/HBZ0Qmpi+MckhtMSi7yKmH3euqmDWmmU9zFFGgyBde4YD1PunrH1Tb+v/x8Wh54o0xEwLEMLjl4ulxmwRmO86Jr44yZSuH6jT279qlhsJmHS9rOB5+2JdhLupGpFg9VA1qNja/8Li/XSxR6mnjakSx9NCjGM4wGpjML6Hsprs11NdNkJt6JDJwcIldmr/K2EVTIEcrL1at1aXdOAtv+kSzAAJdnI8TmG6z54fSKPcV84kAFjKvpff4d18FcGbS6OaVGWj+IWKXr84T8xGtB [email protected]
package main
import (
"crypto/rand"
"crypto/rsa"
"log"
)
func main() {
rnd := rand.Reader
@nasermirzaei89
nasermirzaei89 / genres.csv
Last active April 7, 2018 22:08
ID3v1 Genres List
Index Title
0 Blues
1 Classic Rock
2 Country
3 Dance
4 Disco
5 Funk
6 Grunge
7 Hip-Hop
8 Jazz
@nasermirzaei89
nasermirzaei89 / Makefile
Created March 6, 2017 09:39
Check Docker Compose Validation
#@IgnoreInspection BashAddShebang
check-docker-compose:
docker-compose -f docker-compose.yml config
reformat-docker-compose: check-docker-compose
docker-compose -f docker-compose.yml config > docker-compose.yml.tmp
mv docker-compose.yml.tmp docker-compose.yml
@nasermirzaei89
nasermirzaei89 / run.sh
Created December 22, 2016 00:16
How to see what packages my app imports
go list -f '{{join .Deps "\n"}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY "order" ASC) AS row_number FROM myschema.mytable) AS foo WHERE row_number > 200 AND row_number <= 210
// commonInitialisms is a set of common initialisms.
// Only add entries that are highly unlikely to be non-initialisms.
// For instance, "ID" is fine (Freudian code is rare), but "AND" is not.
// https://github.com/golang/lint/blob/3d26dc39376c307203d3a221bada26816b3073cf/lint.go#L482
var commonInitialisms = map[string]bool{
"API": true,
"ASCII": true,
"CPU": true,
"CSS": true,
"DNS": true,
package models
import (
"database/sql/driver"
"encoding/json"
"errors"
)
// GenericJSONField is used to handle generic json data in postgres
type GenericJSONField map[string]interface{}