Skip to content

Instantly share code, notes, and snippets.

View Lucascoorek's full-sized avatar
❤️

Łukasz Kurek Lucascoorek

❤️
View GitHub Profile
@daveh
daveh / attributes.php
Created January 11, 2022 09:10
What's new in PHP 8.0 (code to accompany https://youtu.be/ve9bKHZG47c)
<?php
#[\Attribute(Attribute::TARGET_CLASS)]
class Route
{
public function __construct(
public string $path
)
{}
}
function Person() {
this.age = 0;
function growUp() {
console.log('Function', this.age);
}
const growUpArrow = () => console.log('Arrow function', this.age);
growUp();
@ddieppa
ddieppa / npx command to run angular cli
Last active November 1, 2023 13:44
This is the npx command to run angular cli new project without install it globally
npx -p @angular/cli ng new hello-world-project
then locally can run
npx ng g c hello-world-component
@rosswintle
rosswintle / Stats.php
Created May 17, 2017 08:42
Simple Laravel Service Container/Provider example
<?php
// This is the Stats class I wanted to create. It lives in app/Stats.php, but could be anywhere that the AutoLoader will recognise it
namespace App;
use App\Action;
use Carbon\Carbon;
/**
@benhoIIand
benhoIIand / .zshrc
Last active October 15, 2021 08:36
Configuration for ZSH with aliases
# Path to your oh-my-zsh installation.
export ZSH=/Users/bholland/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="random"
# Uncomment the following line to use case-sensitive completion.
@lukaszfiszer
lukaszfiszer / ISO_3166-1_countries_pl.js
Last active October 27, 2022 22:11
List of all countries with their ISO 3166-1 codes, polish and english names, in javascript and json. Sorted by polish name. Source: http://pl.wikipedia.org/wiki/ISO_3166-1 Lista wszystkich państw świata wraz z ich polską i angielską nazwą oraz kodem wg. ISO 3166-1, w formatach javascript i JSON. Posortowana wg. polskiej nazwy: Zródło: http://pl.…
[
{ name_pl: "Afganistan", name_en: "Afghanistan", code: "AF" },
{ name_pl: "Albania", name_en: "Albania", code: "AL" },
{ name_pl: "Algieria", name_en: "Algeria", code: "DZ" },
{ name_pl: "Andora", name_en: "Andorra", code: "AD" },
{ name_pl: "Angola", name_en: "Angola", code: "AO" },
{ name_pl: "Anguilla", name_en: "Anguilla", code: "AI" },
{ name_pl: "Antarktyka", name_en: "Antarctica", code: "AQ" },
{ name_pl: "Antigua i Barbuda", name_en: "Antigua and Barbuda", code: "AG" },
{ name_pl: "Arabia Saudyjska", name_en: "Saudi Arabia", code: "SA" },