Skip to content

Instantly share code, notes, and snippets.

@joecampo
joecampo / Connecting PHP 5.6 to MSSQL.md
Last active June 4, 2022 14:20
Connecting PHP 5.6 to MSSQL - Ubuntu (Debian) w/ Apache
@mjtorn
mjtorn / xorg_build-0.5.sh
Created January 11, 2014 15:36
How to build Xorg unintrusively. Works on Debian Sid with xdm. At the time of posting this, at least.
#!/bin/bash
## Thank you for helping us help you help us all
SRCDIR=/usr/src/tmpfs/xorg
DSTDIR=/opt/xorg
## Define what's cloned
REPOS="\
git://anongit.freedesktop.org/git/xorg/util/macros \
@Uflex
Uflex / clang-format_config.md
Last active November 3, 2019 16:19
Configuration of clang-format for QtCreator

Clang-format in QtCreator

Edit: QtCreator 3.1 introduced a new plugin called Beautifier that supports clang-format. You still have to install the clang tools separately but you don't have to add them as external tools anymore. The plugin can be configured in the options dialog under the beautifier tab > Clang Format. Add a new style and copy the configuration below without the curly braces.

QtCreator doesn't allow using clang-format by default. Watch QTCREATORBUG-10111 for a better integration. As of today, you should use it as an external tool, either replacing your selection or the entire file. If you choose to replace the file, you will have to save it before launching the tool and QtCreator will reload the file, making it impossible to undo/redo afterwards. If you choose to replace your selection, you often have to select the whole function, otherwise you will lose the indentation; clang-format doesn't seem to k

@puttputt
puttputt / jtv.php
Created May 26, 2011 02:37
Check if justin.tv stream is live, display if it is
<?
//Script for Saskgamers.com
//Determines if a user's justin.tv stream is online, then displays it if it is
//To add more streams add the justin.tv channel id to the $streams array
$chan = "";
$streams = array(
"puttly", "j4sh", "strainkiss", "milfhunter", "gorgenzola", "steven_bonnell_ii"
);
echo "<span class=\"smalltext\"><strong>Live User Streams:</strong> ";
foreach ($streams as &$i) {