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
#include <ESP8266WiFi.h> | |
int PIN_N = 15; // pin on which LED is connected | |
int PIN_MODE = LOW; | |
int SERIAL_BAUD = 115200; | |
const char* WIFI_SSID = "ESP8266"; // your WiFi SSID | |
const char* WIFI_PASSWORD = "nodemcutest"; // your WiFi password |
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
<?php | |
namespace App\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity(repositoryClass="App\Repository\ExampleRepository") | |
* @ORM\HasLifecycleCallbacks() | |
* @ORM\Table("examples") |
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
{% extends 'bootstrap_4_horizontal_layout.html.twig' %} | |
{% block form_label_errors %}{% endblock %} | |
{% block form_row -%} | |
{%- if expanded is defined and expanded -%} | |
{{ block('fieldset_form_row') }} | |
{%- else -%} | |
<div class="form-group row{% if (not compound or force_error|default(false)) and not valid %} is-invalid{% endif %}"> | |
{{- form_label(form) -}} |
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
<?php | |
namespace App\Twig; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use Twig\Extension\AbstractExtension; | |
use Twig\TwigFunction; | |
class ActiveExtension extends AbstractExtension | |
{ |
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
const e = str => { | |
const replacements = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
"'": ''', | |
'"': '"', | |
}; | |
return str.replace(/[&<>"']/g, match => replacements[match]) | |
}; |
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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=IN | |
network={ | |
ssid="VPZ" | |
psk="SecretWifiPassword" | |
key_mgmt=WPA-PSK | |
} |
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 | |
sudo nano /lib/systemd/system/bluetooth.service | |
## Changes >> | |
ExecStart=/usr/lib/bluetooth/bluetoothd | |
## --- TO --- | |
ExecStart=/usr/lib/bluetooth/bluetoothd --experimental | |
## << Changes |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
const handleLogout = () => { | |
axios.post('/logout') | |
.then(() => location.href = '/home') | |
}; | |
function Example() { | |
return ( |
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
function resize($el) { | |
const data = $el.data('center'); | |
if (data.x) { | |
const w_width = $(window).width(); | |
const e_width = $el.width(); | |
const margin = (w_width - e_width) / 2; | |
$el.css('left', margin) | |
} | |
if (data.y) { | |
const w_height = $(window).height(); |
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
namespace Examle | |
{ | |
public class Typeahead | |
{ | |
public readonly Dictionary<string, string> Countries = new Dictionary<string, string> | |
{ | |
{ "AF", "Afghanistan" }, | |
{ "AL", "Albania" }, | |
{ "DZ", "Algeria" }, | |
{ "AS", "American Samoa" }, |