Skip to content

Instantly share code, notes, and snippets.

@danielstgt
danielstgt / imagick3.4.4-PHP7.4-forge.sh
Last active April 19, 2024 11:33
Install ImageMagick / Imagick 3.4.4 on PHP 7.4 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
#define SPI_INSTANCE 1 /**< SPI instance index. */
#define BUFF_LENGTH 2 /**< Transfer length. */
static const nrf_drv_spi_t spi = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE); /**< SPI instance. */
static uint8_t m_tx_buf[BUFF_LENGTH]; /**< TX buffer. */
static uint8_t m_rx_buf[BUFF_LENGTH]; /**< RX buffer. */
static volatile bool burst_completed = false;
static volatile bool spi_xfer_done = false; /**< Flag used to indicate that SPI instance completed the transfer. */
@ppelleti
ppelleti / svg-to-dxf.pl
Created May 4, 2016 02:22
Convert SVG files to DXF files on Mac OS X
#!/usr/bin/perl -w
# svg-to-dxf.pl - convert SVG files to DXF files on Mac OS X
# by Patrick Pelletier, public domain (or cc0)
# based on the commands suggested here:
# https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_2D_formats
# assumes Inkscape.app is installed in /Applications
# and pstoedit is installed in PATH, such as via "brew install pstoedit"
use Cwd qw(abs_path);
@cdunca
cdunca / FromUnixTImeFunction.php
Created September 5, 2015 11:45
Symfony - Doctrine dql extension for from_unixtime()
<?php
namespace AppBundle\DQL;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
/**
* FromUnixtimeFunction ::=
* "unix_timestamp" "(" ArithmeticPrimary "," ArithmeticPrimary ")"
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube