Skip to content

Instantly share code, notes, and snippets.

View ChgoChad's full-sized avatar

Chad C ChgoChad

  • Chicago
  • 08:39 (UTC -05:00)
View GitHub Profile
@gbraad
gbraad / README.md
Created March 16, 2019 01:25
ffmpeg with NDI

Follow the ffmpeg compilation guide here: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

copy "lib" and "include" directories from NDI sdk to ffmpeg_sources/ndi

use this modified build command:

cd ~/ffmpeg_sources && wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && tar xjvf ffmpeg-snapshot.tar.bz2 && cd ffmpeg && PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include -I$HOME/ffmpeg_sources/ndi/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -L$HOME/ffmpeg_sources/ndi/lib/x86_64-linux-gnu" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-libass --enable-libfreetype --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libndi_newtek --enable-nonfree && PATH="$HOME/bin:$PATH" make -j4 && make install && hash -r

(I omitted some libraries I do not need, --enable what suits you better)

@ChgoChad
ChgoChad / commands.php
Last active January 5, 2024 22:18 — forked from escopecz/commands.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMautic'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
<?php
/**
* Push data to a Mautic form
*
* @param array $data The data submitted by your form
* @param integer $formId Mautic Form ID
* @param string $ip IP address of the lead
* @return boolean
*/
@escopecz
escopecz / commands.php
Last active April 18, 2023 22:43 — forked from alanhartless/cron.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMauticReallyIDo'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@rbdone
rbdone / bingKmlParser.js
Created October 29, 2012 19:35
Converts polygon xml from KML files to BingMaps 7.0 Polygon objects
var bingKmlParser = function() {
// private variables
var _styles = {};
var _styleMap = {};
// private methods
function _parsePolygons(placemarkXml) {
@Chicago
Chicago / gist:1165275
Created August 23, 2011 14:29
Crimes - Sample R code - Pie Chart
##Quick and easy way to visualize the crimes data set using open source techniques
##Have more ideas? Tell me about them at @ChicagoCDO
##All you need to do is install R at http://cran.r-project.org/ and run this file
install.packages("googleVis")
library(googleVis)
crimes_stage <- read.csv("http://data.cityofchicago.org/views/x2n5-8w5q/rows.csv")
attach(crimes_stage)
##remove first row with column names
crimes <- crimes_stage[-c(1),]
##create frequency table from crime