Skip to content

Instantly share code, notes, and snippets.

@vinaymavi
vinaymavi / buildspec.yml
Created December 5, 2018 02:50
AWS code build configuration for angular project CI and CD setup.
version: 0.2
phases:
install:
commands:
# Get Chrome Information
- curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
- apt-get -y update
# Install chrome
@vinaymavi
vinaymavi / angular-karma-configuration-for-ci-cd
Last active April 4, 2019 21:20
This Gist contains karma configuration for CI and CD setup for angular projects.
browsers: ["HeadlessChrome"],
customLaunchers: {
HeadlessChrome: {
base: "ChromeHeadless",
flags: [
"--no-sandbox", // required to run without privileges in Docker
"--disable-web-security",
"--disable-gpu",
"--remote-debugging-port=9222"
]
defmodule Filter do
def start_flow do
streams()
|> Flow.from_enumerables()
|> Flow.filter(&Regex.match?(~r/publishing/, &1))
|> Flow.map(&get_key_and_payload(&1))
|> Flow.partition(key: {:elem, 0})
|> Flow.reduce(fn -> %{} end, fn x, acc ->
Map.put_new(acc, elem(x, 1), elem(x, 2))
end)
@bradtraversy
bradtraversy / django_cheat_sheet.md
Last active May 28, 2024 11:57
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv
@PCreations
PCreations / rxjs-diagrams.md
Last active January 18, 2024 08:52
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@mondain
mondain / public-stun-list.txt
Last active June 21, 2024 04:54
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@RIAEvangelist
RIAEvangelist / Install Cloud9 on local or remote computer, server, or raspberry pi
Last active June 6, 2023 03:37
This gist will help you install Cloud9 on your local or remote computer, server, or even your raspberry pi. Many people are having issues at the time of this Gist's creation.
Complete installation process:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git
@drewolson
drewolson / reflection.go
Last active November 20, 2023 09:39
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`