Skip to content

Instantly share code, notes, and snippets.

View thinkbox's full-sized avatar

Jonno thinkbox

  • Brisbane, Australia
View GitHub Profile
@jpillora
jpillora / search-example.json
Last active February 3, 2022 03:08
Torrent cloud search provider specification
{
"mininova": {
"name": "Mininova",
"type": "screen-scraper",
"list": {
"url": "http://www.mininova.org/search/{query}/seeds/{page}",
"items": ".maintable > tr",
"item": {
"name":"td:nth-child(3) > a:nth-child(2)",
"url":"td:nth-child(3) > a:nth-child(2)@href",
@alganet
alganet / md.md
Last active March 19, 2018 11:55
Non-Fluent Respect\Validation

Non-Fluent Respect\Validation

Hi! I'm one of the developers of Respect\Validation and other less known Respect components. Feel free to ask any questions here or on reddit.

There are many micro-frameworks that rely on magic methods. We don't. In this article I'm gonna explore the Respect\Validation API without fluent interfaces or magic methods. I'll use a traditional dependency injection approach.

The following validator was inspired by one of our README examples:

@cdgraff
cdgraff / install-avconv-amazon-linux-2014.09.sh
Last active December 27, 2016 11:19
install-avconv-amazon-linux-2014.09
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
# and modified to works with libav and some extra improvements
# Updated 09/01/2015 by Alejandro Ferrari (www.wmconsulting.info)
# Tested with Amazon Linux 2014.09 and Centos 6.6
# can download Docker image with AVCONV build from here:
# URL Docker
if [ "`/usr/bin/whoami`" != "root" ]; then
#! /usr/bin/env php
<?php
/***
* PageSnap
*
* Script for archiving a HTML page (and associated media assets) into a single file.
*
* Requires:
*
@asika32764
asika32764 / phpos-possible-values.md
Created August 16, 2014 06:18
PHP_OS possible values

Some possible values for PHP predefined constant PHP_OS:

  • CYGWIN_NT-5.1
  • Darwin
  • FreeBSD
  • HP-UX
  • IRIX64
  • Linux
  • NetBSD
  • OpenBSD
@0xPr0xy
0xPr0xy / torrent_cli.py
Created April 25, 2014 09:04
torrent cli
#!/usr/bin/env python
from BeautifulSoup import BeautifulSoup
import click
import requests
@click.group()
def cli():
pass
@click.command()
@andreazevedo
andreazevedo / install_mono.sh
Last active November 12, 2021 02:51
Install mono on centOS 6.x
$ yum install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
$ cd /usr/local/src
$ wget http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2
$ tar jxf mono-3.2.8.tar.bz2
$ cd mono-3.2.8
@mustafaturan
mustafaturan / latest-ffmpeg-centos6.sh
Last active October 25, 2022 20:14
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@ttscoff
ttscoff / aliaslast.bash
Last active May 13, 2021 06:28
Alias last command in bash and save
# alias last and save
# use `als c NAME` to chop off the last argument (for filenames/patterns)
als() {
local aliasfile chop x
[[ $# == 0 ]] && echo "Name your alias" && return
if [[ $1 == "c" ]]; then
chop=true
shift
fi
aliasfile=~/.bash_it/aliases/custom.aliases.bash
@lastguest
lastguest / Chainable.class.php
Last active March 17, 2023 09:46
PHP Class Chainable.Wrapper for convenient chaining methods.
<?php
/**
* Class Chainable
* Wrapper for convenient chaining methods
*
* @author Stefano Azzolini <lastguest@gmail.com>
*/
class Chainable {
private $instance = null;