Skip to content

Instantly share code, notes, and snippets.

View PoisonousJohn's full-sized avatar

Ivan Fateev PoisonousJohn

View GitHub Profile
#!/bin/bash -x
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
# Extension Copyright (c) 2013 Weptun Gmbh
# http://www.weptun.de
# Extension Copyright (c) 2013 FoundryLogic LLC
# http://foundrylogic.com
#
# Extended by Ronan O Ciosoig January 2012
@PoisonousJohn
PoisonousJohn / AssetGPULoader.cs
Created January 14, 2016 10:42 — forked from flarb/AssetGPULoader.cs
Unity3d GPU Pre-loader
using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;
public class AssetGPULoader : MonoBehaviour {
public Camera activeCamera;
RenderTexture _rt;
@PoisonousJohn
PoisonousJohn / convertToSmb.sh
Last active February 11, 2016 13:20
convert windows-like network path to smb linux path
#!/bin/sh
printf "%s" $1 | sed -n -E 's,^(\\)+,smb://,gp' | sed -n 's,\\,/,gp'
@PoisonousJohn
PoisonousJohn / rc.local
Last active March 6, 2016 23:43
Run AceStream engine on startup of OSMC
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
{
"error": {
"code": 500,
"message": "Internal Server Error",
"exception": [
{
"message": "An exception occurred while executing 'SELECT c0_.id AS id_0, (CASE WHEN c1_.translation IS NOT NULL THEN c1_.translation ELSE c2_.translation END) AS sclr_1, c0_.depth AS depth_2, c3_.id AS id_3, c4_.id AS id_4, (CASE WHEN c1_.locale IS NOT NULL THEN c1_.locale ELSE c2_.locale END) AS sclr_5, c0_.default_locale AS default_locale_6 FROM ca_categories c0_ LEFT JOIN ca_category_translations c1_ ON c0_.id = c1_.idCategories AND (c1_.locale = 'en') LEFT JOIN ca_category_translations c2_ ON c0_.id = c2_.idCategories AND (c2_.locale = c0_.default_locale) LEFT JOIN ca_categories c3_ ON c0_.idCategoriesParent = c3_.id LEFT JOIN ca_categories c4_ ON c0_.id = c4_.idCategoriesParent WHERE c0_.id IN (?) GROUP BY c0_.id ORDER BY c0_.depth ASC' with params [2]:\n\nSQLSTATE[42803]: Grouping error: 7 ERROR: column \"c1_.translation\" must appear in the GROUP BY clause or be used
@PoisonousJohn
PoisonousJohn / ttl.sh
Created June 4, 2016 11:39
Avoid Beeline tethering blocking
#!/bin/sh
sudo sysctl net.ipv4.ip_default_ttl=65
@PoisonousJohn
PoisonousJohn / PostProcessBuildPlayer_iPadProIcon
Created June 8, 2016 06:25
Copy iPad Pro icon 83.5@2x (167x167) to the XCode project if Unity doesn't support this yet
#!/usr/bin/python
# This script adds ipad pro icon to xcode project. Icon should be located at path Assets/Icons/size@Scalex
import argparse
import json
import os
import shutil
import sys
@PoisonousJohn
PoisonousJohn / disableImageInlining.sh
Last active June 29, 2016 09:23
Disable Apple Mail Image Inlining
#!/bin/sh
defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
@PoisonousJohn
PoisonousJohn / config.txt
Created January 3, 2017 12:05
How to get waveshare 7" touchscreen working on Raspberry Pi 2
# set current over USB to 1.2A
max_usb_current=1
# overscan to adjust image position
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
# HDMI config
@PoisonousJohn
PoisonousJohn / updateFiles.sh
Created February 7, 2017 15:08
Update modified timestamp of files by extension in bash
#!/bin/sh
for file in `find . -name "*.$1"`; do echo >> $file; done