Skip to content

Instantly share code, notes, and snippets.

View ganeshkbhat's full-sized avatar

Krishnamurthy G B ganeshkbhat

View GitHub Profile
@chumaumenze
chumaumenze / List of Countries
Last active March 25, 2023 14:35
Full list of countries with official state name, aplha-2 and aplha-3 code, and ccTLD.
Full list of countries with official state name, aplha-2 and aplha-3 code, and ccTLD.
@manekinekko
manekinekko / regex-es6-imports.js
Last active February 1, 2024 16:05
A regular Expression to parse ECMAScript6 import syntax
let regex = `import
(?:
["'\s]*
([\w*{}\n, ]+)
from\s*
)?
["'\s]*
([@\w/_-]+)
["'\s]*
;?
@nkt
nkt / Results.md
Last active September 27, 2023 08:24
ReactPHP vs Node.js

wrk -t4 -c400 -d10s http://127.0.0.1:1337/

PHP

Running 10s test @ http://127.0.0.1:1337/
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
 Latency 7.02ms 6.94ms 82.86ms 85.27%
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@coolaj86
coolaj86 / 01-static-dependency-injection.js
Last active January 13, 2018 04:24
Static vs Dynamic vs Automatic Dependency Injection
// It's known that I need arg1, arg2, arg3
function myThing(arg1, arg2, arg2) {
return arg1 + arg2 + arg3;
}
registerWithInjector(myThing);
@jmk
jmk / example.cpp
Created October 17, 2012 15:48
Example of showing different context menu for items in a QTreeWidget
#include "main.h"
int main(int argc, char** argv)
{
QApplication app(argc, argv);
MyTreeWidget w;
w.show();