Skip to content

Instantly share code, notes, and snippets.

@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016
This is an ANSIBLE Cheat Sheet from Jon Warbrick
View ansible-summary.md

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@karpathy
karpathy / min-char-rnn.py
Last active Jan 17, 2022
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@m-radzikowski
m-radzikowski / script-template.sh
Last active Jan 17, 2022
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
View script-template.sh
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@yanofsky
yanofsky / LICENSE
Last active Jan 17, 2022
A script to download all of a user's tweets into a csv
View LICENSE
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@spalladino
spalladino / mysql-docker.sh
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@michaeltreat
michaeltreat / mongodb_shell_commands.md
Last active Jan 16, 2022
Quick Cheat Sheet for Mongo DB Shell commands.
View mongodb_shell_commands.md

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@KdotJPG
KdotJPG / OpenSimplexNoise.java
Last active Jan 16, 2022
Visually isotropic coherent noise algorithm based on the simplectic honeycomb.
View OpenSimplexNoise.java
/*
* 2014 OpenSimplex Noise in Java.
* by Kurt Spencer
*
* Updated Dec 2019 and Feb 2020:
* - New lattice-symmetric gradient sets
* - Optional alternate lattice orientation evaluators
*
* This implementation has been updated to slightly improve its output, but it is recommented to first
* try the newer OpenSimplex2S or OpenSimplex2F noise. These are located in the OpenSimplex2 repo:
@ibraheem4
ibraheem4 / postgres-brew.md
Last active Jan 15, 2022 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)
View postgres-brew.md

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@Warchant
Warchant / sonarqube-docker-compose.yml
Last active Jan 14, 2022
docker-compose file to setup production-ready sonarqube
View sonarqube-docker-compose.yml
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks: