Skip to content

Instantly share code, notes, and snippets.

View NLKNguyen's full-sized avatar

Nikyle Nguyen NLKNguyen

View GitHub Profile
@aviadhahami
aviadhahami / Dockerfile
Created July 5, 2023 22:37
Node 10 + Python 2.7 for old time crap; Also works as a devcontainer 👍
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:buster
# update the repository sources list
# and install dependencies
RUN apt-get update \
&& apt-get install -y curl python2.7 git wget curl build-essential\
&& apt-get -y autoclean
# Set python2.7 alias
@ShaneTsui
ShaneTsui / client.cpp
Created July 3, 2020 01:08
Communicate using json string with ZMQ
#include <zmq.hpp>
#include <string>
#include <iostream>
#include "json.hpp"
int main() {
zmq::context_t context;
zmq::socket_t socket(context, ZMQ_REQ);
socket.connect("tcp://localhost:5555");
for (int i = 0; i < 10; ++i) {
@germanviscuso
germanviscuso / en-US.json
Last active January 31, 2023 15:40
Alexa Skill Basics: Global Persistence with the DynamoDB persistence adapter or the S3 Persistence adapter
{
"interactionModel": {
"languageModel": {
"invocationName": "global persistence demo",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
@mbinna
mbinna / effective_modern_cmake.md
Last active May 3, 2024 15:44
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@drodsou
drodsou / writeFileSyncRecursive.js
Last active April 11, 2024 16:06
Like writeFileSync but creating all folder paths if not exist
// -- updated in 2020/04/19 covering the issues in the comments to this point
// -- remember you also have things like `ensureDirSync` from https://github.com/jprichardson/node-fs-extra/blob/master/docs/ensureDir-sync.md
const fs = require('fs')
function writeFileSyncRecursive(filename, content, charset) {
// -- normalize path separator to '/' instead of path.sep,
// -- as / works in node for Windows as well, and mixed \\ and / can appear in the path
let filepath = filename.replace(/\\/g,'/');
// -- preparation to allow absolute paths as well
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 07:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@bpierre
bpierre / README.md
Last active February 15, 2024 18:40
Switch To Vim For Good

Switch To Vim For Good

NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.

My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0

@romainl
romainl / _rnb.md
Last active August 12, 2021 21:56
RNB, a Vim colorscheme template
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing