Skip to content

Instantly share code, notes, and snippets.

@1eedaegon
1eedaegon / install-vmware-player-with-vagrant.ps1
Last active May 20, 2024 04:02
Install vagrant with vmware for windows 11
# 1. Download and install go
https://golang.org/doc/install
# 2. Download and install VMware workstation player
https://www.vmware.com/products/workstation-player.html
# 3. Download and install vagrant
https://www.vagrantup.com/downloads
# 4. Download vagrant vmware utility
'use strict'
const AWS = require('aws-sdk');
var MongoClient = require('mongodb').MongoClient;
let atlas_connection_uri;
exports.handler = (event, context, callback) => {
var uri = process.env['MONGODB_ATLAS_CLUSTER_URI'];
if (atlas_connection_uri != null) {
@zavarat
zavarat / sed_snippets.sh
Created January 5, 2018 18:57 — forked from r2k0/sed_snippets.sh
sed examples
##FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# triple space a file
@AfroThundr3007730
AfroThundr3007730 / 00-genieacs.md
Last active July 23, 2024 02:00
My notes on setting up and configuring GenieACS.

Config files to get GenieACS up and running on Debian Testing, complete with GUI, Nginx SSL proxy, and systemd services.

Following the documentation here for dependencies, here for initial setup, then the wiki here for Nginx and SSL, should get you most of the way there. After that, I had a lot of googling to do, the results of which you can find below.

Filename Description
01-install.sh The installation instructions and commands.
02-config.json The genieacs services configuration.
03-openssl.cnf The openssl certificate configuration.
04-.env The environmental variables for genieacs-gui.
@aponxi
aponxi / sql-mongo_comparison.md
Last active February 21, 2024 11:56
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@edhemphill
edhemphill / texample.cpp
Created February 28, 2012 22:43
C++ threaded extension for node.js w/ gyp build
// Originally at:
// http://bravenewmethod.wordpress.com/2011/03/30/callbacks-from-threaded-node-js-c-extension/
#include <queue>
// node headers
#include <v8.h>
#include <node.h>
#include <ev.h>
#include <pthread.h>
@charlesdaniel
charlesdaniel / basic_auth_nodejs_test.js
Created January 27, 2012 02:53
Example of HTTP Basic Auth in NodeJS
var http = require('http');
var server = http.createServer(function(req, res) {
// console.log(req); // debug dump the request
// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object)
var auth = req.headers['authorization']; // auth is in base64(username:password) so we need to decode the base64
console.log("Authorization Header is: ", auth);
@r2k0
r2k0 / sed_snippets.sh
Last active July 15, 2024 17:09
sed examples
##FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# triple space a file