Skip to content

Instantly share code, notes, and snippets.

View jbelmont's full-sized avatar
💭
Weekend Mode

Jean-Marcel Belmont jbelmont

💭
Weekend Mode
View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active November 10, 2024 13:48
Git CLI Cheatsheet
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active October 1, 2024 17:10
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@ilyaigpetrov
ilyaigpetrov / Meteor Alternatives Per Feature.md
Last active September 15, 2024 20:21
Meteor Alternatives Per Feature | by https://git.io/ilyaigpetrov

Meteor Alternatives Per Feature

This table was created in 2015 so may be quite outdated today.

Feature Meteor Solution Alternative Solutions Description
Live DB Sync [livequery][lq] ([mongo-oplog]), [ddp] RethinkDB, Redis, ShareDB, [npm:mongo-oplog], [firebase], etc. Push DB updates to client/server.
Latency Compensation, Optimistic UI [minimongo][mm] [RethinkDB][lcr], [mWater/minimongo] (fork, not ws but http, browserify) Imitate successful db query on client before it is done.
Isomorphic Code [isobuild] & isopacks browserify Write one code for server/client/mobile.
Isomorphic Packaging [isobuild], atmosphere No more separate packages for server & client. Get bower + npm + mobile.
## GIT PROMPT DISPLAY
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✚"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%} ⇡"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[014]%} ✭"
PROMPT='$FG[008][%*]%{$reset_color%} $FG[004]%~%{$reset_color%} $FG[006]$(git_current_branch)%{$reset_color%}$(git_prompt_status)
$FG[002]❯%{$reset_color%} '
@kevinadi
kevinadi / mongodb-ssl.sh
Last active September 20, 2024 10:10
Script to create self-signed CA certificates, server certificates, and client certificates for testing MongoDB with SSL
#!/bin/sh
# Generate self signed root CA cert
openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/[email protected]"
# Generate server cert to be signed
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/[email protected]"
# Sign the server cert
@kevinadi
kevinadi / mgo-ssl.go
Last active January 5, 2024 16:02
Small example of using MongoDB go driver (mgo) to connect using SSL with client certificate
package main
import (
"fmt"
"log"
"net"
"crypto/tls"
"crypto/x509"
## GIT PROMPT DISPLAY
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✚"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%} ⇡"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[014]%} ✭"
PROMPT='$FG[008][%*]%{$reset_color%} $FG[004]%~%{$reset_color%} $FG[006]$(git_current_branch)%{$reset_color%}$(git_prompt_status)
$FG[002]❯%{$reset_color%} '
@jbelmont
jbelmont / mongo_shell_tips.md
Last active March 4, 2019 00:24
A list of commands you can use in mongodb.

Basic Commands

Action Run Command Example
Connect to local host on default port 27017 mongo mongo
Connect to remote host on specified port mongo --host --port mongo --host 192.168.65.23 --port 27020
Connect to a database mongo / mongo 192.168.65.23/api
Show current database db db
Select or switch database use use api
Execute a JavaScript file load() load (program.js)
// a list of useful queries for profiler analysis. Starting with the most basic.
// 2.4 compatible
//
// output explained:
//
{
"ts" : ISODate("2012-09-14T16:34:00.010Z"), // date it occurred
"op" : "query", // the operation type
"ns" : "game.players", // the db and collection