Skip to content

Instantly share code, notes, and snippets.

View keinajar's full-sized avatar

Jari Keinänen keinajar

View GitHub Profile
@brasofilo
brasofilo / old-upload-method.php
Last active October 5, 2018 18:11
Replace the New WP 3.5 Uploader with the Old Thickbox
<?php
/**
* Plugin Name: Old Upload Method
* Plugin URI: http://wordpress.org/support/topic/is-there-a-way-to-disable-the-new-media-manager
* Description: Replace the new media upload with the old thickbox
* Author: A.Morita, brasofilo
* Version: 1.2
* License: GPLv2 or later
*
@maximveksler
maximveksler / FuckingAVFoundation.m
Created February 25, 2014 23:36
Fucking AV Foundation code with audio and video mixing
- (void)buildTransitionCompositionAUDIO:(AVMutableComposition *)composition andVideoComposition:(AVMutableVideoComposition *)videoComposition andAudioMix:(AVMutableAudioMix *)audioMix
{
CMTime nextClipStartTime = kCMTimeZero;
// Add two video tracks and two audio tracks.
AVMutableCompositionTrack *compositionVideoTracks[2];
AVMutableCompositionTrack *compositionAudioTracks[2];
compositionVideoTracks[0] = [composition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid];
compositionVideoTracks[1] = [composition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid];
@cstrahan
cstrahan / Showdown.as
Created October 27, 2010 10:04
Showdown.as: An AS3 port of John Fraser's showdown.js
// UPDATE: For latest code, see https://github.com/cstrahan/Showdown.as
//
// Showdown.as -- An ActionScript port of showdown.js
//
// Copyright (c) 2010 Charles Strahan.
//
// Original Showdown Copyright (c) 2007 John Fraser.
// <http://attacklab.net/showdown/>
//
// Original Markdown Copyright (c) 2004-2005 John Gruber
@pxslip
pxslip / brew-sync.sh
Last active December 29, 2015 02:39 — forked from jpawlowski/brew-sync.sh
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
# Also syncs gui applications installed using brew-cask (https://github.com/phinze/homebrew-cask)
# Modified from https://gist.github.com/jpawlowski/5248465
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
$BREW tap > /tmp/brew-sync.taps
@pocmo
pocmo / netbeans_php_colors.xml
Created April 18, 2011 14:10
Netbeans like PHP colors for IntelliJ IDEA 10
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="netbeans_php_colors" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Monospaced" />
<colors />
<attributes>
<option name="CUSTOM_LINE_COMMENT_ATTRIBUTES">
<value>
<option name="FOREGROUND" value="808080" />