Skip to content

Instantly share code, notes, and snippets.

View ZweiSteinSoft's full-sized avatar

Ann ZweiSteinSoft

  • ZweiSteinSoft
  • Germany
View GitHub Profile
@ZweiSteinSoft
ZweiSteinSoft / gist:1622107
Created January 16, 2012 18:13
PHP: Find out directory of current file
<?php
$strDir = dirname(__FILE__);
@ZweiSteinSoft
ZweiSteinSoft / App.xaml
Created January 24, 2012 12:13
WPF: Use Aero styling for controls.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component\themes/aero.normalcolor.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- other resources go here -->
</ResourceDictionary>
</Application.Resources>
@ZweiSteinSoft
ZweiSteinSoft / jquery-fallback.html
Created January 25, 2012 17:20
JS: Load jQuery from CDN, or from local file if CDN is down
<script src="//code.jquery.com/jquery-1.7.min.js"></script>
<script>window.jQuery || document.write('<script src="//yoursite.com/libs/jquery.js"><\/script>')</script>
@ZweiSteinSoft
ZweiSteinSoft / get_object_vars.php
Created March 1, 2012 00:53
PHP: Convert object to non-associative array
<?php
$arrImages = get_object_vars($arrImages);
@ZweiSteinSoft
ZweiSteinSoft / utf8_decode2.php
Created March 1, 2012 00:51
PHP: Decode UTF-8 characters in a string. Really an extended htmlentities.
<?php
function utf8_decode2($strText)
{
// Only do the slow convert if there are 8-bit characters
// avoid using 0xA0 (\240) in preg ranges. RH73 does not like that
if (! preg_match('/[\200-\237]/', $strText) && ! preg_match('/[\241-\377]/', $strText))
{
return $strText;
}
@ZweiSteinSoft
ZweiSteinSoft / Win8-Editions.md
Created March 2, 2012 14:07
Windows 8 editions
  • Windows 8 Enterprise Edition
  • Windows 8 Enterprise Eval edition
  • Windows 8 Home Basic Edition
  • Windows 8 Home Premium edition
  • Windows 8 ARM edition
  • Windows 8 Professional edition
  • Windows 8 Professional Plus edition
  • Windows 8 Starter edition
  • Windows 8 Ultimate edition
@ZweiSteinSoft
ZweiSteinSoft / meta-charset-utf-8.html
Created March 4, 2012 20:54
#HTML5: The new way to define the meta #charset (#UTF8, for example)
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
</body>
</html>
@ZweiSteinSoft
ZweiSteinSoft / stdClass.php
Created March 4, 2012 23:59
#PHP: Create an empty object
<?php
$objSomeStuff = new stdClass;
@ZweiSteinSoft
ZweiSteinSoft / git-list-contrib.sh
Created April 8, 2012 19:20
List all contributors of a #Git repo, most actives first
#!/bin/sh
git log --pretty=format:%aN | sort | uniq -c | sort -rn
@ZweiSteinSoft
ZweiSteinSoft / WLE2011QFE3-details.md
Created April 10, 2012 19:21
Update to Windows Live Essentials 2011 QFE3 (build: 15.4.3555.0308)

This update improves performance in Windows Live Essentials 2011. The following list describes these changes:

  1. Setup: During installation, the splash screen loads faster after user accepts UAC prompt.
  2. Windows Live Mail: When users click on photos within Windows Live Mail that are hosted on SkyDrive or Facebook, instead of using the Client Album Viewer to view the photos, a browser opens the web album viewer for that application.
  3. Windows Live Messenger: Fixes the Messenger sign-in error "0x84cb000c" and the Messenger crash or hang when accepting/declining a pending invitation. When users click on photos are hosted on SkyDrive or Facebook, instead of using the Client Album Viewer to view the photos, a browser opens the web album viewer for that application.
  4. Windows Live Movie Maker: Fixes error “80004003” where Windows Live Movie Maker can’t open project files. Fixes setup failure error “80040705” and error “87260103” or when Movie Maker becomes unresponsive, hangs when adding