Skip to content

Instantly share code, notes, and snippets.

@moeiscool
moeiscool / amcrestVideoScraper.js
Last active May 1, 2024 12:30
Amcrest Camera Mass (Bulk) Video Exporter with Web Browser Console
/// How it works :
/// This script will download videos from your Amcrest Camera automatically (automate cumbersome task of individually clicking download on each video)
/// Limitation is that it will stop downloading when it reaches the end of the month.
/// HOW TO USE :
// 1. Login to Amcrest camera and click Playback tab.
// 2. Select Day of the Month to begin downloading from.
// 3. Open the Web Browser Console. (CTRL + SHIFT + C on Mac)
// 4. Paste this entire script in the execution field and run it.
// 5. You will see the files start downloading.
@manniru
manniru / gist:5eeeadda8cc1df511bf20911c02b506d
Created April 22, 2020 11:58
FFmpeg command line examples

Simple Stream

ffmpeg -i rtmp://server.ip/application/streamname -c copy -f flv rtmp://server.ip/application/streamname

Copy to FLV

ffmpeg -i %1 -c copy -copyts %1.flv

Copy 5 minutes to MP4

ffmpeg -i %1 -t 00:05:00 -c copy -copyts %1.mp4

Encode to MP4 at 8k bitrate, veryfast preset and film tuning, AAC Audio

@moeiscool
moeiscool / ffmpegToWeb.js
Last active May 1, 2024 12:29
FLV Live Stream to Web Page with flv.js, FFMPEG, and Express Web Server (Node.js)
// Shinobi (http://shinobi.video) - FFMPEG FLV over HTTP Test
// How to Use
// 1. Navigate to directory where this file is.
// 2. Run `npm install express`
// 3. Start with `node ffmpegToWeb.js`
// 4. Get the IP address of the computer where you did step 1. Example : 127.0.0.1
// 5. Open `http://127.0.0.1:8001/` in your browser.
var child = require('child_process');
var events = require('events');
@manniru
manniru / ffmpegToWeb.js
Created April 16, 2020 15:07 — forked from moeiscool/ffmpegToWeb.js
FLV Live Stream to Web Page with flv.js, FFMPEG, and Express Web Server (Node.js)
// Shinobi (http://shinobi.video) - FFMPEG FLV over HTTP Test
// How to Use
// 1. Navigate to directory where this file is.
// 2. Run `npm install express`
// 3. Start with `node ffmpegToWeb.js`
// 4. Get the IP address of the computer where you did step 1. Example : 127.0.0.1
// 5. Open `http://127.0.0.1:8001/` in your browser.
var child = require('child_process');
var events = require('events');
<?php
$options_array = [];
$field_name = 'nationality';
$definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions('business', 'bundle');
if (isset($definitions[$field_name])) {
$options_array = $definitions[$field_name]->getSetting('allowed_values');
}
print('<pre>' . print_r($options_array, TRUE) . '</pre>'); exit();
<?php
$ent = Cooperative::load(1);
$build['obj'] = \Drupal::entityManager()->getViewBuilder('cooperative')->view($ent);
@manniru
manniru / FullExample.php
Created February 21, 2020 17:22 — forked from IamSmith/FullExample.php
Fully working example
<?php
require_once("PHPExcel/PHPExcel.php");
$phpExcel = new PHPExcel();
$styleArray = array(
'font' => array(
'bold' => true,
)
);

@Hannahdouken has outsmarted the t-shirt bots stealing people's designs on Twitter.

This is a blocklist for the sites caught up in the sting operation. Below is a table with the offending sites and links, some of them archived for perpetuity, so you can add them to a blocking service like uBlock Origin and Pi-hole. All you have to do is add this link to your blocklist:

https://gist.githubusercontent.com/ndarville/6da8247493e8c06daaf306bb6c4b2c29/raw/7582b3cc7c9c8d2018ba2bd8b7b05a8f8a272cb1/blocklist.txt

For more, check out Waxy.org's coverage.

Please add your own links in the comments.

@LukeMathWalker
LukeMathWalker / .gitlab-ci.yml
Last active May 1, 2024 12:28
GitLab CI - Rust setup
image: "rust:latest"
default:
before_script:
- rustc --version
- cargo --version
stages:
- test
@aidos-dev
aidos-dev / README.md
Last active May 1, 2024 12:28
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf