Skip to content

Instantly share code, notes, and snippets.

View isurfer21's full-sized avatar

Abhishek Kumar isurfer21

View GitHub Profile
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
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
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
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
@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.

@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",
@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";
@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
@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>