Skip to content

Instantly share code, notes, and snippets.

View dvejmz's full-sized avatar
🐧
Page faults left and right

David Jimenez dvejmz

🐧
Page faults left and right
View GitHub Profile
@a-h
a-h / .vimrc
Last active April 8, 2020 09:55
My .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 December 20, 2023 16:50
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
@jlis
jlis / .gitlab-ci.yml
Created May 15, 2018 13:16
AWS ECS and ECR deployment via Docker and Gitlab CI
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 September 25, 2023 13:57
AWS CloudFormation YAML template - appending to list parameter types.

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
@benyanke
benyanke / fidget.sh
Last active November 5, 2017 07:13
Bash fidget spinner
# 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";
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 24, 2024 18:21
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@GLMeece
GLMeece / latency_numbers.md
Last active March 1, 2024 10:02
Latency Numbers Every Programmer Should Know - MarkDown Fork

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 February 3, 2016 19:11
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.
#
# 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 February 28, 2024 19:48
Convert SVG to ICO using ImageMagick, with transparent background and multi-size icons
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 24, 2024 11:43
PostgreSQL command line cheatsheet

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)