Skip to content

Instantly share code, notes, and snippets.

View isurfer21's full-sized avatar

Abhishek Kumar isurfer21

View GitHub Profile
@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:

@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
@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
@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
@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,
@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.

<!-- executed third -->
<script type="module">
console.log("Inline module!");
</script>
<!-- executed first -->
<script src="main.js"></script>
<!-- executed second -->
<script defer>
@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" />
@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",
@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
},