// Instead Of
$categories = Category::all();
$products = Products::all();
$products->each(function($product) use ($categories) {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Property / Log Level | Debug | Info | Notice | Warning | Error | Critical | Alert | Emergency | |
---|---|---|---|---|---|---|---|---|---|
Disposable | X | ||||||||
Statistical | X | X | X | X | X | X | X | ||
Relevant | X | X | X | X | X | X | |||
Undersired | X | X | X | X | X | ||||
Unstable | X | X | X | X | |||||
Stateful | X | X | X | ||||||
Unsecure | X | X | |||||||
Unfixable | X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type SubscribedEvent = (...args) => any; | |
class EventObserver { | |
public events: SubscribedEvent[] = []; | |
subscribe(fn: SubscribedEvent) { | |
this.events.push(fn) | |
} | |
unsubscribe(fn: SubscribedEvent) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Класс Singleton предоставляет метод getInstance, который позволяет клиентам | |
* получить доступ к уникальному экземпляру одиночки. | |
*/ | |
class Singleton { | |
private static instance: Singleton; | |
/** | |
* Конструктор Singleton должен быть приватный, чтобы кто-нибудь случайно не создал | |
* объект через оператор new. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instal dependencies | |
sudo apt install wireguard git dh-autoreconf libglib2.0-dev intltool build-essential libgtk-3-dev libnma-dev libsecret-1-dev network-manager-dev resolvconf | |
# clone repo and build | |
git clone https://github.com/max-moser/network-manager-wireguard | |
cd network-manager-wireguard | |
./autogen.sh --without-libnm-glib | |
./configure --without-libnm-glib --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/NetworkManager --localstatedir=/var |
git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400
Note: This gist may be outdated, thanks to all contributors in comments.
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.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This injects a box into the page that moves with the mouse; | |
// Useful for debugging | |
async function installMouseHelper(page) { | |
await page.evaluateOnNewDocument(() => { | |
// Install mouse helper only for top-level frame. | |
if (window !== window.parent) | |
return; | |
window.addEventListener('DOMContentLoaded', () => { | |
const box = document.createElement('puppeteer-mouse-pointer'); | |
const styleElement = document.createElement('style'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Your system should be 64 bits and check if the last version at https://github.com/danielchatfield/trello-desktop/ is 0.19 | |
# If the current version is not 0.19 change the file name below accordingly | |
wget https://github.com/Racle/trello-desktop/releases/download/v0.2.0/Trello-linux-0.2.0.zip -O trello.zip | |
sudo mkdir /opt/trello | |
sudo unzip trello.zip -d /opt/trello/ | |
sudo ln -sf /opt/trello/Trello /usr/bin/trello | |
echo -e '[Desktop Entry]\n Version=1.0\n Name=Trello Desktop\n Exec=/usr/bin/trello\n Icon=/opt/trello/resources/app/static/Icon.png\n Type=Application\n Categories=Application' | sudo tee /usr/share/applications/trello.desktop |
NewerOlder