Skip to content

Instantly share code, notes, and snippets.

View andrerds's full-sized avatar
:octocat:
Working....

André Rds andrerds

:octocat:
Working....
View GitHub Profile
@klemensz
klemensz / hide-header.directive.ts
Last active September 30, 2023 20:35
Hide header on scroll in Ionic 5
import { Directive, HostListener, Input, OnInit, Renderer2 } from '@angular/core';
import { DomController } from '@ionic/angular';
/**
* Moves away the header when scrolling down.
*/
@Directive({
selector: '[appHideHeader]',
})
export class HideHeaderDirective implements OnInit {
@weird-coon
weird-coon / iphone_media_query.md
Last active October 19, 2021 01:25
CSS media query iPhone breakpoint

iPhone 11

/* 1792x828px at 326ppi */
@media only screen 
    and (device-width: 414px) 
    and (device-height: 896px) 
    and (-webkit-device-pixel-ratio: 2) { }

This media query is also for: iPhone XR

@slykar
slykar / docker-compose-hackintosh.md
Last active November 13, 2025 10:30
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@plinionaves
plinionaves / eslint_prettier_airbnb.md
Created November 29, 2019 02:24 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@ninadvadujkar
ninadvadujkar / retry.interceptor.ts
Last active April 3, 2023 08:54
A basic Angular HTTP Interceptor to retry requests when there's an error
import { Injectable } from '@angular/core';
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http';
import { Observable, timer, throwError, of } from 'rxjs';
import { retryWhen, tap, mergeMap } from 'rxjs/operators';
@Injectable()
export class HttpRequestInterceptor implements HttpInterceptor {
retryDelay = 2000;
retryMaxAttempts = 2;
@Farious
Farious / rollback_aab.sh
Last active January 22, 2025 21:22
Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab. This enables us to re-submit a previously submited aab to the play store, doing a rollback to the given version.
#!/bin/sh
#
# Script that will use the provided Android App Bundle (.aab) and change its version code and version name to the provided values, avoiding re-building the whole .aab.
# Run this script with: sh rollback.sh your_project.aab android_signing_key.key key_alias key_pwd version_code version_name
#
# Necessary setup:
#
# jarsigner - This binary should exist in the path
#
# Configuration.proto and Resources.proto can be found in aapt2's github
@plinionaves
plinionaves / IonicAngularVSCode.md
Last active April 14, 2022 01:06
Ionic + Angular VSCode Settings
@pjobson
pjobson / clover_boot_flags.md
Last active September 29, 2024 16:59
Clover Boot Flags

Clover Boot Flags

Flag Description
-v Verbose Mode
-x Safe Mode
-s Single User Mode
-no-zp Zone Postponing (use if hanging)
cpus=1 Single CPU Core Mode
-f No Kext Cache Mode (use if hanging)
@gokulkrishh
gokulkrishh / media-query.css
Last active November 18, 2025 15:54
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@Mikodes
Mikodes / gist:be9b9ce42e46c3d4ccb6
Created November 26, 2014 10:30
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}