Skip to content

Instantly share code, notes, and snippets.

@AdamBien
AdamBien / 120thAirhacksQ&A.md
Created February 8, 2024 14:10
120thAirhacksQ&A.md

Ask questions and see you at March 4th, 8 pm CET: youtube.com/c/bienadam

Also checkout recent episode:

119th airhacks.tv

Please keep the questions as short and as concise as only possible. Feel free to ask several, shorter questions. I will also cover some questions in my "shorts" youtube.com/@bienadam/shorts between the shows.

.progress {
position: fixed;
top: 0;
z-index: 1000;
height: 4px;
width: 100%;
border-radius: 2px;
background-clip: padding-box;
overflow: hidden;
}
@mjmenger
mjmenger / .bash_aliases
Last active May 11, 2024 16:14
bash aliases I like to have available
# Terraform aliases
# adding time to the commands because I'm very interested
# in how long these activities take with more complex builds
# across disparate platforms
alias tfi='terraform init'
alias tfp='time terraform plan'
alias tfa='time terraform apply'
alias tfaa='time terraform apply -auto-approve '
alias tfd='time terraform destroy'
alias tfda='time terraform destroy -auto-approve '

How to install Laravel globally in Ubuntu

===================================================================

Open your terminal using Ctrl+Alt+T and type the following commands

Step 1: Install Laravel

composer global require "laravel/installer"
@ba11b0y
ba11b0y / installing-postman.md
Last active August 31, 2023 19:21
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@vasanthk
vasanthk / System Design.md
Last active May 16, 2024 20:21
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ssinss
ssinss / EndlessRecyclerOnScrollListener.java
Last active January 19, 2024 08:52
Endless RecyclerView OnScrollListener
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
int firstVisibleItem, visibleItemCount, totalItemCount;
@mrded
mrded / csrf.js
Last active April 24, 2024 13:17
AngularJS: add csrf token to angular http requests
angular.config(function($httpProvider) {
var authToken = $('meta[name="csrf-token"]').attr('content');
$httpProvider.defaults.headers.common["X-CSRF-TOKEN"] = authToken;
});