Skip to content

Instantly share code, notes, and snippets.

View samcrosoft's full-sized avatar

Adebola Samuel Olowofela samcrosoft

View GitHub Profile
@samcrosoft
samcrosoft / reset_id_column.sql
Created December 5, 2018 14:58 — forked from irazasyed/reset_id_column.sql
MySQL: Reset id column to auto increment from 1
-- your_table: The table to modify
-- id: The id field/column to reset
SET @num := 0;
UPDATE your_table SET id = @num := (@num+1);
ALTER TABLE your_table AUTO_INCREMENT =1;
@samcrosoft
samcrosoft / babel.sh
Created July 27, 2018 16:25 — forked from specialunderwear/babel.sh
Install all utf8 locales on ubuntu
#! /bin/sh
cd /usr/share/locales
./install-language-pack eo
./install-language-pack ia
./install-language-pack ie
./install-language-pack io
./install-language-pack vo
./install-language-pack ca
@samcrosoft
samcrosoft / readme.md
Created April 20, 2016 13:21 — forked from max-mapper/readme.md
ffmpeg youtube live event rtmp stream from raspberry pi with raspi camera (raspivid)
  1. compile ffmpeg for arm https://github.com/fiorix/ffmpeg-arm
  2. create youtube 'live event'. get rtmp url + session id
  3. run this:
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>

you can tweak -b and -fps to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera

@samcrosoft
samcrosoft / symfony2_nginx.conf
Last active August 29, 2015 14:26 — forked from ZipoKing/symfony2_nginx.conf
Sample nginx configuration for Symfony2
server {
listen 80;
server_name symfony2;
root /var/www/symfony2/web;
error_log /var/log/nginx/symfony2.error.log;
access_log /var/log/nginx/symfony2.access.log;
# strip app.php/ prefix if it is present
License Key PhpStorm 8
User Name : EMBRACE
===== LICENSE BEGIN =====
43136-12042010
00002UsvSON704l"dILe1PVx3y4"B3
49AU6oSDJrsjE8nMOQh"8HTDJHIUUh
gd1BebYc5U"6OxDbVsALB4Eb10PW8"
===== LICENSE END =====
#!/bin/bash
echo "--------------------------------------------------------------------------------------------"
echo "Installing Predis on Ubuntu 12.04"
echo "Read more: https://github.com/nrk/predis"
echo "Author: Ralf Rottmann | @ralf | http://rottmann.net"
echo "--------------------------------------------------------------------------------------------"
PHP5_CONF_DIR="/etc/php5/conf.d"
PHP_INCLUDE_DIR="/usr/share/php5"
echo "Checking prerequisites..."
echo "Git available?"
  1. This works on Linux guests only
  2. Amend your Vagrantfile accordingly
  3. Run vagrant plugin install vagrant-winnfsd
  4. Say thanks to @GM-Alex for his amazing work.
Since I was looking all around how to uninstall packages and after reading tones
of documentations here's the short how-to uninstall a workbench package in Laravel
(or how I managed it to work out):
1. Remove package service provider from 'providers' array in app/config/app.php
2. Remove the package folder in workbench/
3. Run:

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related