Skip to content

Instantly share code, notes, and snippets.

View ZweiSteinSoft's full-sized avatar

Ann ZweiSteinSoft

  • ZweiSteinSoft
  • Germany
View GitHub Profile
@ZweiSteinSoft
ZweiSteinSoft / server-time.php
Created September 7, 2012 00:05
Compare server time with client time
Server time: <?php echo date('r'); ?><br />
Client time: <script>document.write(new Date().toString());</script>
1. SSH into your server as root.
2. Run top.
3. Press shift + m.
4. Note the highest RES memory used by httpd.
5. Hit Q to exit top.
6. Execute: service httpd stop
7. Once httpd is stopped, execute: free -m
8. Note the memory listed under "used".
9. Find the guaranteed memory for your VPS plan. Support can tell you how much you have guaranteed if you cannot find it.
10. Subtract the memory USED from the memory that your plan is GUARANTEED. This will give you your base FREE MEMORY POOL.
@ZweiSteinSoft
ZweiSteinSoft / reply.html
Created July 6, 2012 19:16
API reply for statuses/update_with_media.json
HTTP/1.1 417 Expectation Failed
Date: Fri, 06 Jul 2012 19:14:33 GMT
Server: hi
Vary: Accept-Encoding
Content-Length: 364
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>417 Expectation Failed</title>
@ZweiSteinSoft
ZweiSteinSoft / Extending the Contributors Feature.md
Last active September 1, 2021 20:54
Extending Twitter’s Contributors Feature

Extending Twitter’s Contributors Feature

RFE Draft

By @myx

Contents

  1. Terms
  2. Background
  3. Current Contributors Feature
@ZweiSteinSoft
ZweiSteinSoft / TwAPI-List-entities.md
Created June 23, 2012 20:07
Twitter API entities: No lists support?

The Twitter API does not return lists as entities. Instead, the returned entity is the list owner only.

Tweet text

Here is a list: @mynetx/twcorp while the user is @echofon and the link is http://t.co/Bdx07zv.

Entities

The tweet entities are, according to API:

@ZweiSteinSoft
ZweiSteinSoft / VisualStudioLogo.xaml
Created June 6, 2012 20:16
The #VisualStudio logo in vector #XAML format
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:col="clr-namespace:System.Collections;assembly=mscorlib"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="BrandingLogoLight" Color="#FFFFFFFF"/>
<VisualBrush x:Key="VisualStudioLogo" Stretch="Uniform" ViewboxUnits="RelativeToBoundingBox" ViewportUnits="RelativeToBoundingBox" TileMode="None" AlignmentX="Left" AlignmentY="Top">
<VisualBrush.Visual>
<Canvas Width="675" Height="114">
<Canvas Width="675" Height="114">
@ZweiSteinSoft
ZweiSteinSoft / mysql_query_debug.php
Created April 15, 2012 02:30
Get instant alerts on what’s wrong while trying #mysql queries
<?php
($ret = mysql_query($query)) || die($query . ' ' . mysql_error());
@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
@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 / create-gitio.sh
Created March 10, 2012 13:52
Bash: Create git.io short URL for any Github page
#!/bin/bash
curl -i http://git.io -F "url=https://github.com/phpmyadmin/phpmyadmin" \
-F "code=pma"