This file contains hidden or 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 | |
| return | |
| [ // Type Unit Multiplicator | |
| 1 => ['Energy', 'Wh', '0.01'], | |
| 2 => ['Energy', 'Wh', '0.1'], | |
| 3 => ['Energy', 'Wh', '1'], | |
| 4 => ['Energy', 'Wh', '10'], | |
| 5 => ['Energy', 'Wh', '100'], | |
| 6 => ['Energy', 'Wh', '1000'], |
This file contains hidden or 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 is a digital signage player for Samsung Tizen / Embedded screens. | |
| It buffers the entire video into RAM (Blob) before playing to prevent high traffic. | |
| Plays video ./video.mp4 in a loop, after loading has finished. | |
| TO CHANGE VIDEO: Edit the <video> tag attribute: data-remote-src="PATH/TO/YOUR/VIDEO.mp4" | |
| IMPORTANT: The video file MUST be on the same domain, or the server must enable CORS. | |
| * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> |
This file contains hidden or 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
| <# | |
| .SYNOPSIS | |
| Parse Gemweb/CityWeb Directory Pages - Extract company data from Swiss municipality directories | |
| .DESCRIPTION | |
| This script extracts company listings from Gemweb/CityWeb directory websites (KantoneWeb platform by i-web.ch). | |
| These are commonly used by Swiss municipalities for their business directories. | |
| The script reads the data-entities JSON attribute from the directory page, parses it, and fetches detailed | |
| address information from each company's detail page. Output is a tab-separated TSV file ready for analysis. |
This file contains hidden or 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 | |
| # List of IP addresses to ping (one per line) | |
| IPS=( | |
| "1.1.1.1" | |
| "192.168.1.1" | |
| # Add more IPs here | |
| ) | |
| # Ping interval in seconds |
This file contains hidden or 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
| [ | |
| { | |
| "maxAgeSeconds": 60, | |
| "method": [ | |
| "GET" | |
| ], | |
| "origin": [ | |
| "*" | |
| ], | |
| "responseHeader": [ |
This file contains hidden or 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 script gracefully terminates all processes with the given name (first parameter) when it's run. | |
| # It will also answer to a confirm message, if the process has one, by a given hotkey. | |
| # | |
| # | |
| # signature: closeApplication.ps1 $ProcessName $ConfirmHotkey | |
| # | |
| # | |
| # some simple examples how to use it: | |
| # closeApplications.ps1 'notepad' close all open instances with the process name 'notepad' (you should try this) | |
| # closeApplications.ps1 'winword' '%Y' close all open instances of word and and send ALT+Y if a confirmation window pops up |
This file contains hidden or 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
| pipelines: | |
| pull-requests: | |
| '**': | |
| - step: | |
| name: Build Testing | |
| image: composer:latest | |
| artifacts: | |
| - "vendor/**" | |
| script: | |
| # Install php dependencies |
This file contains hidden or 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
| sudo apt-get update && sudo apt-get install bridge-utils | |
| sudo nano /etc/network/interfaces | |
| iface eth0 inet manual | |
| iface eth1 inet manual | |
| auto eth0 | |
| iface br0 inet manual | |
| bridge_ports eth0 eth1 |
This file contains hidden or 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
| /* Larvel Form Manipulator | |
| * Enables Multiple submit buttons in one form, and manipulates form-action, form-method and crud-method. | |
| * Usage: | |
| * <input type="submit" value="Submit to alternative action" data-submit-action="/new-target"> | |
| * <input type="submit" value="Submit to alternative target" data-submit-target="_blank"> | |
| * <input type="submit" value="Submit as delete" data-submit-method="delete"> | |
| * <input type="submit" value="Submit with confirmation" data-submit-confirmation="Are you sure?"> | |
| * Of course it works with laravelcollective forms as well: |
This file contains hidden or 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
| # docker-compose run workspace | |
| services: | |
| workspace: | |
| image: node:slim | |
| user: "node" | |
| volumes: | |
| - ${PWD}:/home/node/app:delegated | |
| working_dir: /home/node/app | |
| command: bash |
NewerOlder