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
| # Bootstrap this repository for GitHub Copilot | |
| Configure the current repository with durable Copilot instructions, MCP servers, reusable agents and skills, language-server support, and supporting CLI tools. | |
| Work from the repository root. | |
| ## Operating constraints | |
| * Make the setup **additive, idempotent, and non-destructive**. | |
| * Preserve unrelated existing configuration, comments, servers, agents, skills, and documentation. |
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
| foreach (DataRow task in tasks) | |
| { | |
| DataRow manufacturer = GetManufacturer(Convert.ToInt32(task["ManufacturerID"])); | |
| DataRowCollection recipients = GetRecipients(Convert.ToInt32(task["ManufacturerID"])); | |
| if (recipients.Count > 0) | |
| { | |
| DataSet results = GetResults(Convert.ToDateTime(task["StartDate"]), Convert.ToDateTime(task["EndDate"]), Convert.ToInt32(task["ManufacturerID"])); | |
| ExcelPackage package = new ExcelPackage(); | |
| ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("Sheet1"); |
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
| ffmpeg -loop 1 -framerate 1 -i image.jpg -i music.mp3 -c:v libx264 -preset veryslow -crf 0 -c:a copy -shortest output.mkv |
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
| const toSmartDate = (date) => | |
| { | |
| const year = date.getFullYear() * 10000; | |
| const month = (date.getMonth()+1) * 100; | |
| const day = date.getDate(); | |
| return year + month + day; | |
| } | |
| const fromSmartDate = (smartDate) => | |
| { |
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
| using System; | |
| using System.IO; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| class AES | |
| { | |
| public static string Encrypt(string plainText, string keyString) | |
| { | |
| byte[] cipherData; |
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
| using System; | |
| using System.Security.Cryptography; | |
| public class PBKDF2 | |
| { | |
| private int hashBytes; | |
| private int saltBytes; | |
| private int iterations; | |
| public PBKDF2(int _hashBytes, int _saltBytes, int _iterations) |
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
| const main = () => | |
| { | |
| const node = new Ipfs(); | |
| node.on('ready', () => | |
| { | |
| document.getElementById('files').addEventListener('change', handleFileSelect, false); | |
| }); | |
| const handleFileSelect = (event) => |
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
| # replace volume-alias with your preferred alias and /mnt/encrypted with your preferred mount point | |
| fdisk /dev/xvdb | |
| cryptsetup luksFormat /dev/xvdb1 | |
| cryptsetup luksOpen /dev/xvdb1 volume-alias | |
| mkfs.ext4 /dev/mapper/volume-alias | |
| mkdir /mnt/encrypted | |
| mount /dev/mapper/volume-alias /mnt/encrypted | |
| umount /dev/mapper/volume-alias | |
| cryptsetup luksClose volume-alias |
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 | |
| if [[ $1 =~ ^[0-9]+$ ]] | |
| then | |
| cat /dev/urandom | tr -dc '[:graph:]' | head -c $1; echo | |
| else | |
| cat /dev/urandom | tr -dc '[:graph:]' | head -c 20; echo | |
| fi |
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
| /* | |
| Use ACRCloud (https://www.acrcloud.com) to identify songs from a digital radio station and email you when the same artist plays 3 times in a row which could be useful for certain radio competitions (e.g. http://www.heart.co.uk/radio/win-with-hearts-30k-triple-play/). This is just a proof on concept. | |
| npm init -y | |
| npm install --save lodash mailgun-js express body-parser | |
| 1) Edit the config as below, you'll need a Mailgun API key for sending emails. | |
| 2) Run this app server behind a reverse proxy like NGINX. | |
| 3) Setup broadcast monitoring on ACRCloud. |
NewerOlder