Skip to content

Instantly share code, notes, and snippets.

View AlexanderC's full-sized avatar
💭
I might be slow to respond.

Alex Cryp AlexanderC

💭
I might be slow to respond.
View GitHub Profile
@AlexanderC
AlexanderC / gist:3986104
Created October 31, 2012 09:36 — forked from faleev/gist:3435377
Compile FFmpeg on Ubuntu

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

@AlexanderC
AlexanderC / gist:4525951
Created January 13, 2013 20:13
Spherus alt method
<?php
//...
private static function ReadDirectory($path, $includeHiddenFiles = false, $readDirectories = true, $readFiles = true)
{
$result = [];
if (!$readFiles && !$readDirectories) {
return $result;
@AlexanderC
AlexanderC / tree.php
Last active December 20, 2015 04:59
PHP bug reproducement
<?php
/**
* @author AlexanderC
*/
class Tree
{
/**
* @var Node
*/
@AlexanderC
AlexanderC / _.php
Last active December 25, 2015 02:19
Hardcore USSR Framework...
<?php
class ☭ {
protected $☭;
public function __call($n, $v)
{
$this->☭ or ($this->☭ = (object)[]);
@$this->☭->{$n} or ($this->☭->{$n} = []);
$this->☭->{$n}[trim(mb_substr($v[0], 0, mb_strpos($v[0], "\n")))] = create_function(
<?php
/**
* @author AlexanderC <self@alexanderc.me>
*/
namespace Life;
class Mood extends Life
{
@AlexanderC
AlexanderC / deploy.sh
Last active August 29, 2015 14:08
DEEP(symfony2) deploy script
#!/bin/bash
TRUE=1
FALSE=0
path=$(cd $(dirname $0); pwd -P)
is_sudoer=$(sudo -n uptime 2>&1 | grep "load" | wc -l | tr -d ' ')
api_version="v1"
env="prod"
@AlexanderC
AlexanderC / prototype.php
Last active August 29, 2015 14:11
Consolator gist example
$name = $i->get('name', 'Anonymous');
$o->writeln("/f[green]Your name is /f[blink+inverted]%s/!f", [$name]);
@AlexanderC
AlexanderC / changelog.sh
Created October 26, 2015 13:40
Generate markdown changelog using a github repo
#!/usr/bin/env bash
path=$(cd $(dirname $0); pwd -P)
### Your changes here
CHANGELOG_PATH="$path/../changelog"
LATEST_CHANGELOG_PATH="$path/../CHANGELOG.md"
### End
LAST_MODIFIED=$1
@AlexanderC
AlexanderC / moldovan_emojis.sh
Last active April 20, 2017 08:10
Dump Moldovan emojis from https://www.pinterest.com/fruitware/moldavian-emoji/ in a Slack compatible format
#!/usr/bin/env bash
_emoji_dir="$1"
_tmp_dir=$(mktemp -d)
_suffix=".emoji.png"
_script="_emoji.js"
_url="https://www.pinterest.com/fruitware/moldavian-emoji/"
_lib="pinterest-api"
die()
@AlexanderC
AlexanderC / crypto.csv
Created January 15, 2018 15:42
Crypto listing
We can't make this file beautiful and searchable because it's too large.
24h_volume_usd,add_date,algorithm,announcement,available_supply,cc_id,chat,chat_2,coin_type,explorer,explorer_2,explorer_3,facebook,id,image_url,last_updated,market_cap_usd,max_supply,message_board,message_board_2,mining_type,name,percent_change_1h,percent_change_24h,percent_change_7d,price_btc,price_usd,rank,slug,source_code,source_code_2,source_code_3,source_code_4,start_date,symbol,total_supply,twitter,website,website_2
24303.0,2014-01-13T22:00:00.000Z,Scrypt,https://bitcointalk.org/index.php?topic=1502028,42.0,4321,https://kiwiirc.com/client/chat.freenode.net/##42coin,,coin,https://chainz.cryptoid.info/42/,https://prohashing.com/explorer/42/,,,42-coin,https://www.cryptocompare.com/media/12318415/42.png,1515593641,2152302,42,,,PoW/PoS,42-coin,5.96,-0.7,4.72,3.71,51245.34,680,42-coin,https://github.com/42-coin/42,,,,2014-04-30T21:00:00.000Z,42,41.99997274,@42newchain,https://42-coin.org/,
7873.7,2017-07-24T21:00:00.000Z,,https://bitcointalk.org/index.php?topic=1992952.0,300.0,,,,token,https://etherscan.io/t