Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
ryanflorence / static_server.js
Last active July 21, 2024 12:43
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@SeanCline
SeanCline / http_listener_test.cpp
Last active May 12, 2022 04:52
A simple test of the experimental http_listener provided by the C++ REST SDK (Casablanca).
#define _CRT_SECURE_NO_DEPRECATE
#include <cpprest/http_listener.h>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <thread>
#include <chrono>
#include <ctime>
@alyssaq
alyssaq / cplusplus-stl-containers.md
Last active June 29, 2021 22:30
C++ Standard Template Library (STL) containers

###Containers Forward Container: forward iterators - increment only in O(1)

  • begin(), end()
  • All containers

Reversible Container: bidirectional iterators - increment and decrement in O(1)

  • rbegin(), rend()
@rxaviers
rxaviers / gist:7360908
Last active July 22, 2024 11:10
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@mojavelinux
mojavelinux / asciidoc-syntax-quick-reference.adoc
Created December 29, 2014 02:01
AsciiDoc Syntax Quick Reference (sample document)

AsciiDoc Syntax Quick Reference

@mjschutz
mjschutz / StdIteratorExample.cpp
Last active September 20, 2022 17:34
Example implementation of std::iterator
#include <iterator> // std::iterator,std::input_iterator_tag
#include <iostream> // std::cout
template <typename T, size_t N>
class SampleVector
{
T vector[N];
public:
class iterator : public std::iterator<std::input_iterator_tag, T>
{
@lukas-h
lukas-h / license-badges.md
Last active July 11, 2024 07:00
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@evalphobia
evalphobia / README.md
Last active February 22, 2024 18:28
Golang Benchmark: gob vs json

tl;dr

  • JSON is faster for small size data
    • map (key size < 50 and Unmarshalling intensive workload)
    • single struct
  • gob is faster for big size data
    • map (key size > 50 or Marshalling intensive workload)
    • slice

(old) about

@repeatedly
repeatedly / fluent.conf
Last active May 31, 2020 03:45
Fluentd: HTTP input simple benchmark
<source>
@type http
port 8888
</source>
<match test.**>
@type flowcounter_simple
</match>