Skip to content

Instantly share code, notes, and snippets.

View isurfer21's full-sized avatar

Abhishek Kumar isurfer21

View GitHub Profile
@santoshshinde2012
santoshshinde2012 / Crypto.md
Last active November 29, 2023 18:17
Secure Client-Side Storage Data Using With Web Crypto (Typescript, AES-GCM, PBKDF2)
export default class Crypto {
    // iterations: It must be a number and should be set as high as possible.
    // So, the more is the number of iterations, the more secure the derived key will be,
    // but in that case it takes greater amount of time to complete.
    // number of interation - the value of 2145 is randomly chosen
    private static iteration = 10;
  
    // algorithm - AES 256 GCM Mode
    private static encryptionAlgorithm = "AES-GCM";
@simibac
simibac / currencies.json
Last active February 15, 2024 11:03
global currencies as list and sql script (157 currencies)
[
{
"code": "EUR",
"name": "Euro",
"name_plural": "euros",
"symbol": "€",
"symbol_native": "€",
"decimal_digits": 2,
"rounding": 0
},
@manpersand
manpersand / countries_and_currencies.json
Created August 22, 2020 21:46
A collection of all countries and their currencies.
[
{
"name": "Andorra",
"code": "AD",
"capital": "Andorra la Vella",
"continent": "Europe",
"currency": {
"code": "EUR",
"name": "Euro",
"name_plural": "euros",
@graphicbeacon
graphicbeacon / index.html
Last active May 20, 2020 14:13
WebAssembly in Dart for web example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="scaffolded-by" content="https://github.com/google/stagehand" />
<title>webassembly_example</title>
<link rel="stylesheet" href="styles.css" />
<!-- executed third -->
<script type="module">
console.log("Inline module!");
</script>
<!-- executed first -->
<script src="main.js"></script>
<!-- executed second -->
<script defer>
@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@henriquegogo
henriquegogo / useOrbit.lua
Last active August 5, 2018 17:42
How to create a simple webservice with Orbit and Lua
#!./bin/orbit
local orbit = require 'orbit'
module('app', package.seeall, orbit.new)
local routes = {
index = function(web)
return 'Start page<br><a href=/about>About</a>'
end,
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2024 16:07
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@jbub
jbub / clean-macports.sh
Created July 8, 2013 21:23
Clean macports temporary build files and remove inactive ports.
# remove all temporary build files
sudo port clean --all installed
# remove all inactive ports
sudo port -f uninstall inactive
@willurd
willurd / web-servers.md
Last active April 25, 2024 01:54
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000