Skip to content

Instantly share code, notes, and snippets.

@rcrowder
rcrowder / pocl_pi.md
Last active June 6, 2020 13:58
PoCL on Raspberry Pi3

Prerequisites

sudo apt update
sudo apt upgrade
sudo apt-get autoremove

sudo apt install libhwloc-dev ocl-icd-opencl-dev libglew-dev zlib1g-dev libedit-dev

LLVM 3.7 + CLang

sudo apt install clang-3.7 libclang-3.7-dev

@mseeley
mseeley / PlayStation 4.xml
Last active July 13, 2020 12:29
Work in progress Plex DLNA profile for the PlayStation 4 Media Player
<?xml version="1.0" encoding="UTF-8"?>
<Client name="PlayStation 4">
<!-- Author: Plex Inc. -->
<!-- http://blog.us.playstation.com/2015/06/15/media-player-coming-to-ps4/ -->
<Identification>
<Header name="User-Agent" substring="PlayStation 4" />
<Header name="User-Agent" substring="UPnP/1.0 DLNADOC/1.50" />
</Identification>
<TranscodeTargets>
@AGWA
AGWA / rpi-hdmi.sh
Last active March 18, 2024 06:04
Enable and disable the HDMI port on the Raspberry Pi: `rpi-hdmi on` to turn on, `rpi-hdmi off` to turn off. X is properly reinitialized when re-enabling.
#!/bin/sh
# Enable and disable HDMI output on the Raspberry Pi
is_off ()
{
tvservice -s | grep "TV is off" >/dev/null
}
case $1 in
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@pazdera
pazdera / gist:1098129
Created July 21, 2011 20:29
Singleton example in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of Singleton design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.