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 <user_config.h> | |
#include <SmingCore/SmingCore.h> | |
#include <Libraries/BMP180/BMP180.h> | |
#define WIFI_SSID "ekreative" // Put you SSID and Password here | |
#define WIFI_PWD "*******" | |
#define DOR_PIN 5 | |
#define NARODM_HOST "narodmon.ru" | |
#define NARODM_PORT 8283 |
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
#!/usr/local/bin/python | |
import serial | |
import sys | |
from math import pow, degrees, radians, acos | |
from scipy import cos, sin, arctan, sqrt, arctan2 | |
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
{% form_theme register _self %} | |
{% block checkbox_row %} | |
{% spaceless %} | |
<div class="form-group"> | |
<div class="checkbox"> | |
{{ form_errors(form) }} | |
<label class="control-label required" for="{{ form.vars.id }}"> | |
<input type="checkbox" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/> | |
{{ label|default(form_label(form)) | raw }} |
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
{ | |
"Data": "From: [email protected]\nTo: [email protected]\nSubject:Disk space filled up \nMIME-Version: 1.0\nContent-type: Multipart/Mixed; boundary=\"NextPart\"\n\n--NextPart\nContent-Type: text/plain\n\nThis is the email to notify that the space in the disc for the server has reached the its maximum. Please, take an action concerning the old logs..\n\n--NextPart" | |
} |
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 | |
$project = "mpm-serv"; | |
$con=mysqli_connect("localhost","root","password"); | |
function createUserAndDb($con, $proj, $type, $host = "localhost"){ | |
$password = bin2hex(openssl_random_pseudo_bytes(10)); | |
$user = "{$proj}-{$type}"; | |
$userHost = "`{$user}`@`{$host}`"; | |
$sql="CREATE USER {$userHost} identified by '{$password}'"; | |
echo "env: $type".PHP_EOL; |
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 | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
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
#!/usr/local/php5/bin/php | |
<?php | |
$domain = null; | |
if (array_key_exists('1', $argv)) { | |
$domain = $argv['1']; | |
$path = str_replace("\n","",`pwd` ); | |
$temlate = <<<TEMPLATE | |
<VirtualHost *:80> |
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 | |
require_once 'vendor/autoload.php'; | |
$files = scandir(__DIR__ . '/src/AppBundle/Entity/'); | |
foreach ($files as $file) { | |
if (is_file(__DIR__ . '/src/AppBundle/Entity/' . $file)) { | |
require_once __DIR__ . '/src/AppBundle/Entity/' . $file; | |
} | |
} |
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
#!/usr/local/php5/bin/php | |
<?php | |
// for mac put file to /usr/local/bin/normalizenames | |
// and chmod +x /usr/local/bin/normalizenames | |
// for use `normalizenames dirname` to normalize | |
$dir = str_replace("\n", "", `pwd`); | |
if (array_key_exists('1', $argv)) { | |
$path = $dir . '/' . $argv['1']; | |
if (is_dir($path)) { |
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 | |
mkdir(__DIR__.'/var/cache/dev',0777,true); | |
mkdir(__DIR__.'/var/cache/prod',0777,true); | |
mkdir(__DIR__.'/var/logs', 0777, true); | |
mkdir(__DIR__.'/var/sessions/prod', 0777, true); | |
file_put_contents(__DIR__.'/var/logs/prod.log','start'); | |
file_put_contents(__DIR__.'/var/logs/dev.log','start'); | |
chmod(__DIR__.'/var/logs/prod.log',0777); |