Skip to content

Instantly share code, notes, and snippets.

View luismisanchez's full-sized avatar

Luismi Sánchez luismisanchez

View GitHub Profile
@luismisanchez
luismisanchez / Symfony-fundamentals-notes.md
Last active January 16, 2022 13:00
Symfony fundamentals notes

Installation

curl -sS https://get.symfony.com/cli/installer | bash
mv /Users/Username/.symfony/bin/symfony /usr/local/bin/symfony
symfony

Check requirements

@luismisanchez
luismisanchez / Git and GitHub tips and notes.md
Last active January 4, 2022 06:15
Git and GitHub tips and notes

Global setup

git config --global user.name "Luismi Sánchez"

git config --global user.email "my@email.com"

Check global config per user:

git config --global -e

@luismisanchez
luismisanchez / android-backup-apk-and-datas.md
Created June 9, 2021 15:49 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

@luismisanchez
luismisanchez / phpPrettyDebugger.php
Last active May 4, 2021 09:09
Simple PHP var pretty debugger
<?php
/**
* Simple var pretty debugger
*
* @param $var
* @param false $exit
*/
function pre_dump($var, bool $exit = false) {
//TODO: Only works if there is a pre_dump() call per line
@luismisanchez
luismisanchez / ffmpeg.md
Created April 25, 2021 14:26 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@luismisanchez
luismisanchez / secure_link.php
Created March 23, 2021 18:05 — forked from bftanase/secure_link.php
generate URL for nginx secure_link
@luismisanchez
luismisanchez / Modules.ts
Created January 19, 2021 14:58
Typescript Modules
// TypeScript is modular, we can divide our code up over several files
// In Angular 2 we then use "import {} from ''" to access the code in these files
// We export a class, interface, variable, ... by adding 'export' keyword in front of it
export class ExportedClass {
// This class is exported
}
@luismisanchez
luismisanchez / Generics.ts
Created January 19, 2021 14:50
Typescript Generics
// Generics are types which can hold/ use several types
// We're only touching the very basics here - you can go MUCH more into detail
// Consider the Array object
let numberArray: Array<number>; // This array will only accept numbers
// Try to initialize it with strings
// numberArray = ['test']; // => Error
@luismisanchez
luismisanchez / Interfaces.ts
Created January 19, 2021 14:45
Typescript Interfaces
// Interfaces allow us to create contracts other classes/ objects have to implement
// We can use them to define custom types without creating classes
// Interfaces ARE NOT compiled to JavaScript! It's just for checking/ validation done by our TypeScript compiler
// Example interface
interface User {
username: string;
password: string;
confirmPassword?: string; // Optional property => Does not have to be implemented
@luismisanchez
luismisanchez / Classes.ts
Created January 15, 2021 19:33
Typescript Classes
// Classes allow us to create 'blueprints' for objects
// In Angular 2 we use classes a lot. For example to create Components, Services, Directives, Pipes, ...
// How to create a class
class Car {
engineName: string;
gears: number;
private speed: number;