Skip to content

Instantly share code, notes, and snippets.

Avatar
🐧
Page faults left and right

David Jimenez dvejmz

🐧
Page faults left and right
View GitHub Profile
@a-h
a-h / .vimrc
Last active Apr 8, 2020
My .vimrc
View .vimrc
" Plugins used
" Install vim-plug.
" https://github.com/junegunn/vim-plug
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
" Install dependencies.
" python3 -m pip install --user --upgrade pynvim
" python -m pip install --user --upgrade pynvim
" :PlugInstall
@ServerlessBot
ServerlessBot / IAMCredentials.json
Last active Apr 6, 2021
Minimum credential set for Serverless Framework
View IAMCredentials.json
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
@jlis
jlis / .gitlab-ci.yml
Created May 15, 2018
AWS ECS and ECR deployment via Docker and Gitlab CI
View .gitlab-ci.yml
image: docker:latest
variables:
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME>
REGION: eu-central-1
TASK_DEFINTION_NAME: <TASK DEFINITION NAME>
CLUSTER_NAME: <CLUSTER NAME>
SERVICE_NAME: <SERVICE NAME>
services:
@magnetikonline
magnetikonline / README.md
Last active Jan 7, 2021
AWS CloudFormation YAML template - appending to list parameter types.
View README.md

AWS CloudFormation YAML template - appending to list parameter types

Documenting this here, as I often forget (what I have found) is the best way to do this at the moment.

For example, you have a list of two existing security groups given to a stack and wish to create (and use) a third - attaching all to an ALB:

AWSTemplateFormatVersion: "2010-09-09"
Description: "Example template"

Parameters:
@benyanke
benyanke / fidget.sh
Last active Nov 5, 2017
Bash fidget spinner
View fidget.sh
# Bash Fidget Spinner
# Could also be included in a bashrc file
fidget() {
start_time="0.02";
spin_efficiency="0.99";
end_time="3";
time="$start_time";
printf "\e[92mPress any key to give another spin...\n\n";
@GLMeece
GLMeece / latency_numbers.md
Last active Feb 3, 2021
Latency Numbers Every Programmer Should Know - MarkDown Fork
View latency_numbers.md

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@MichaelPote
MichaelPote / himawari.ps1
Created Feb 3, 2016
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
View himawari.ps1
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@azam
azam / svg2ico.sh
Last active Apr 13, 2021
Convert SVG to ICO using ImageMagick, with transparent background and multi-size icons
View svg2ico.sh
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico
@Kartones
Kartones / postgres-cheatsheet.md
Last active Apr 13, 2021
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@soarez
soarez / ca.md
Last active Apr 13, 2021
How to setup your own CA with OpenSSL
View ca.md

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.