Skip to content

Instantly share code, notes, and snippets.

View bgadrian's full-sized avatar
✍️
available for OSS Go packages

B.G.Adrian bgadrian

✍️
available for OSS Go packages
View GitHub Profile
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active March 20, 2024 00:17
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@bgadrian
bgadrian / cleanup.sh
Last active December 21, 2017 15:20
Cleanup Web Ubuntu machine
#docker
#docker rmi $(docker images -q -f dangling=true)\
docker system prune #it will remove any stopped containers, unused volumes and networks, and dangling images.
#Remove all images
#docker rmi $(docker images -q)
#Remove all containers
#docker rm $(docker ps -aq)
#node npm meteor
npm cache clean
@bgadrian
bgadrian / bash_aliases.sh
Last active January 3, 2017 11:03
Bash aliases - windows lazy style
alias l='ls -Ahq --group-directories-first --color'
alias resm='sudo /etc/init.d/memcached restart'
alias resn='sudo /etc/init.d/nginx restart'
alias resp='sudo /etc/init.d/php5-fpm restart'
alias resmy='sudo /etc/init.d/mysqld restart'
alias aptg='sudo apt-get'
alias ports='netstat -tulanp'
alias psmem='ps auxf | sort -nr -k 4 | head -10'
@bgadrian
bgadrian / git_aliases
Created March 16, 2015 16:59
Git aliases
//a collection of git aliases
//to have them on all projects on my user
//vim ~/.gitconfig
[alias]
cp = cherry-pick
st = status -s
ci = commit
br = branch
@Fonserbc
Fonserbc / Easing.cs
Last active February 23, 2024 01:13
Compact and simple easing functions for Unity
using UnityEngine;
/*
* Most functions taken from Tween.js - Licensed under the MIT license
* at https://github.com/sole/tween.js
* Quadratic.Bezier by @fonserbc - Licensed under WTFPL license
*/
public delegate float EasingFunction(float k);
public class Easing
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8B32g7Lu/jr6pDq6QajFt1bGBBu/+86L1GFBfmIeAymyJoZldJScwIkAo+zBGyNedDYfh766m+N+IekDiyaoHKGJIJ8RIvcf8nHD4bg3VLcVo0ThI0Z4RM3nU1UA/QTychPRg59RKJaoArMNcBDIt9P9KsSnjAwo1rG//Sa2qYId3Cx1OKqqIRx6vnJxfUWeus+Xy7LPqvvztjfgz+yMG2oV4NN4RmFGMuz5pMq/GRDfBDCzPkj8RbRdqd5kqXUROG1zK4GxuvFqeaA8gOYazr7xVRiRn6qBeo67Pz4YmAJzun2X4jH+9WaejS1Q/NXHTRO0YxF5Awb3cAdZJf3b3Z9QdByTZlNLFU2bV4xGHM2P++tgzF7TfaD8uGEmUjyho4ZhJMwIo35tnoasyE2fYHMfEe6M6XHf1WXd4F4RVr0q4gCQLCtZbvxfmeqA3hwdstVg1BCe2PPu7WGoY7uHBJZB2G3xXSqFTNOXSG5shacGkYQU5QFcIm3NzC1fv+ze82y518wwFRNhY2sGJpGwvlZt7XwU6zFYTkntM5VmhFdA3MiOiM55ocNWD4PhcsSk0+g1VnsvfGekRSOugIwaWSdyiG4lXwq7+nMP4JXf1UPE7iUzzL8Nt6LUM73qmPPNkstCVKdcz2o/0ytS73B3diDrTOQ45bf6O9K1BFYy95Q== adrian@Solomonars-MacBook-Pro.local
@tmichel
tmichel / index.html
Created November 9, 2013 22:07
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />
@jboner
jboner / latency.txt
Last active April 25, 2024 01:18
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags