Skip to content

Instantly share code, notes, and snippets.

View simonkberg's full-sized avatar
:shipit:

Simon Kjellberg simonkberg

:shipit:
View GitHub Profile
2015-02-15 15:31:54 ERROR Thread-62 :: cannot concatenate 'str' and 'exceptions.TypeError' objects
KeyError: 14
fd_obj, handler_func = self._handlers[fd]
File "/media/sdk1/home/**********/.sickrage/tornado/ioloop.py", line 836, in start
Traceback (most recent call last):
2015-02-15 15:31:49 ERROR Exception in callback None
KeyError: 14
fd_obj, handler_func = self._handlers[fd]
File "/media/sdk1/home/**********/.sickrage/tornado/ioloop.py", line 836, in start
Traceback (most recent call last):
2015-02-15 15:31:49 ERROR Thread-59 :: cannot concatenate 'str' and 'exceptions.IOError' objects
KeyError: 14
fd_obj, handler_func = self._handlers[fd]
File "/media/sdk1/home/**********/.sickrage/tornado/ioloop.py", line 836, in start
Traceback (most recent call last):
2015-02-15 15:31:24 ERROR Exception in callback None
2015-02-15 15:31:08 INFO POSTPROCESSER :: Successfully processed
2015-02-15 15:31:08 DEBUG POSTPROCESSER :: You're trying to post process a video that's already been processed, skipping
2015-02-15 15:31:08 DEBUG POSTPROCESSER :: You're trying to post process a video that's already been processed, skipping
2015-02-15 15:31:08 DEBUG POSTPROCESSER :: You're trying to post process a video that's already been processed, skipping
# to execute this gist, run the line bellow in terminal
\curl -L https://gist.githubusercontent.com/SimonKberg/110d1e7a4aaa9a255d2f/raw/b1ab0653403081c97ae3d7567ec45963883ed6d6/install_source_code_pro.sh | sh
{
// If the indent level of a multi-line selection should be aligned
"align_indent": true,
// If indentation is done via tabs, set this to true to also align
// mid-line characters via tabs. This may cause alignment issues when
// viewing the file in an editor with different tab width settings. This
// will also cause multi-character operators to be left-aligned to the
// first character in the operator instead of the character from the
// "alignment_chars" setting.
{
"bold_folder_labels": true,
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Bright.tmTheme", // CHANGE ME
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"draw_white_space": "selection",
"enable_hexadecimal_encoding": false,
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"font_face": "Source Code Pro", // CHANGE ME
@simonkberg
simonkberg / class-tracking.php.patch
Created July 1, 2013 23:15
Fix for missing wp_users-table error in wp-cron
Index: inc/class-tracking.php
===================================================================
--- inc/class-tracking.php (revision 734869)
+++ inc/class-tracking.php (working copy)
@@ -110,7 +110,7 @@
'name' => get_bloginfo( 'name' ),
'version' => get_bloginfo( 'version' ),
'multisite' => is_multisite(),
- 'users' => $wpdb->get_var( "SELECT COUNT(*) FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1 = 1 AND ( wp_usermeta.meta_key = 'wp_{$blog_id}_capabilities' ) " ),
+ 'users' => $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users AS u INNER JOIN $wpdb->usermeta AS m ON (u.ID = m.user_id) WHERE 1 = 1 AND ( m.meta_key = 'wp_{$blog_id}_capabilities' ) " ),
@simonkberg
simonkberg / gist:5868471
Last active December 19, 2015 00:28
All tables to InnoDB Convert to UTF8
SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' ENGINE=InnoDB;')
FROM information_schema.tables
WHERE 1=1
AND engine <> 'MyISAM'
AND table_schema NOT IN ('information_schema', 'mysql', 'performance_schema');
SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;')
FROM information_schema.tables
WHERE 1=1
AND collate <> 'utf8_general_ci';
@simonkberg
simonkberg / gist:5507916
Created May 3, 2013 08:24
MsSQL for Ubuntu
Get dependencies
$ sudo apt-get install php5-sybase freetds-dev php5-dev -y
Move to user hoem directory
$ cd ~
Get php5 source
$ apt-get source php5
Move into the source code directory (substitute x.x with apropritate version number)
@simonkberg
simonkberg / gist:4087491
Created November 16, 2012 13:47
Facebook iFrame check
<?php
// Access with ?dev=true for debugging
$signed_request = isset($_POST['signed_request']) ? $_POST['signed_request'] : false;
$debug = isset($_GET['dev']);
$secret = 'APP_SECRET';
if(!$signed_request && !$debug) {
die('No direct access.');
@simonkberg
simonkberg / gist:3878162
Created October 12, 2012 08:54
ffmpeg convert loop
#!/bin/bash
for f in *.mov
do
ffmpeg -i "$f" -s 728x410 -sameq -acodec libmp3lame -aq 0 "../${f%.mov}.mpg"
done
for f in *.mov
do
ffmpeg -i "$f" -s 960x540 -sameq -vprofile baseline -acodec copy "../mov2/${f%.mov}.mov"