Skip to content

Instantly share code, notes, and snippets.

@shawndumas
shawndumas / .gitconfig
Created August 5, 2013 19:08
Using WinMerge as the git Diff/Merge Tool on Windows 64bit
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge
@staltz
staltz / introrx.md
Last active July 8, 2024 15:46
The introduction to Reactive Programming you've been missing
@alexhawkins
alexhawkins / nativeJavaScript.js
Last active April 28, 2024 08:52
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests
@jamesob
jamesob / devops_checklist.md
Created November 25, 2014 03:14
DevOps checklist

Security

  • no credentials kept in codebase
    • use consul/zookeeper/etc., then have code load credentials from environment variables
  • using a bastion box to safeguard access to servers
    • in conjunction with, e.g., AWS security groups

Development

@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active July 6, 2024 19:43
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@DanLindeman
DanLindeman / docker-compose.yml
Last active June 13, 2023 23:55
Docker Compose for jbpm and kie server execution server
version: "3.4"
services:
jbpm:
image: jboss/jbpm-workbench-showcase
environment:
- "JAVA_OPTS=-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false"
ports:
- "8080:8080"
- "8001:8001"
@jjvillavicencio
jjvillavicencio / setup.sh
Last active July 3, 2024 13:16
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@bbalakriz
bbalakriz / CustomWIH.java
Created September 26, 2018 16:45
Custom Work Item Handler Impl
package com.bala.custom.wih;
import java.util.HashMap;
import java.util.Map;
import org.kie.api.runtime.process.WorkItem;
import org.kie.api.runtime.process.WorkItemHandler;
import org.kie.api.runtime.process.WorkItemManager;
public class CustomWIH implements WorkItemHandler {
@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database