Skip to content

Instantly share code, notes, and snippets.

View AlexZeitler's full-sized avatar
👷‍♂️
Building stuff

Alexander Zeitler AlexZeitler

👷‍♂️
Building stuff
View GitHub Profile
@AlexZeitler
AlexZeitler / angularscope
Created May 27, 2014 09:41
Inspecting AngularJS $scope
angular.element($0).scope()
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
  1. Wget ftp://ftp.gnu.org/pub/gnu/gettext/gettext...t-0.12.1.tar.gz
  2. Untar file as tar -zxvf gettext-0.12.1.tar.gz
  3. cd to the directory containing the package's source code and type ./configure to configure the package for your system. If you're using csh on an old version of System V, you might need to type sh ./configure instead to prevent csh from trying to execute configure itself.

Running configure takes awhile. While running, it prints some messages telling which features it is checking for.

  1. Type make to compile the package.
  2. Optionally, type make check to run any self-tests that come with the package.
  3. Type make install to install the programs and any data files and documentation.
@AlexZeitler
AlexZeitler / WebApiOwinSelfHostInFSharp.fs
Created September 29, 2014 18:40
ASP.NET Web API Owin SelfHost
open Microsoft.Owin.Hosting
open Owin
open System
open System.Net
open System.Net.Http
open System.Web.Http
type HttpRouteDefaults = { Controller : string; Id : obj }
type HomeController() =
@AlexZeitler
AlexZeitler / gist:4537383d83b8a5115c01
Created November 2, 2014 19:47
Windows remote shutdown / restart with login
NET USE \\<RemotePC>\IPC$ <password> /USER:<remoteuser>
shutdown /i
@AlexZeitler
AlexZeitler / gist:8647f420c83847be43c4
Created December 6, 2014 17:21
Some different git log aliases
alias l='git log --graph --date-order -C -M --pretty=format:"<%h> %ad [%an] %Cgreen%d%Creset %s" --all --date=short --max-count=15'
alias l1='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %b %Cgreen(%cd) %C(bold blue)<%an>%Creset" --abbrev-commit'
alias l2='git log --pretty=oneline --abbrev-commit --max-count=15 --decorate'
alias lx='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %Cgreen(%cd) %C(bold blue) %an [%ae]:%Creset %n %s %n %b %n" --abbrev-commit'
alias ll='git log --graph --date-order -C -M --pretty=format:"<%h> %ad [%an] %Cgreen%d%Creset %s" --date=short'
alias gl='git glog'
alias wdw='git log --pretty="format:%an - %s"'
@AlexZeitler
AlexZeitler / gist:055c5d31fc33916df14e
Created December 23, 2014 10:19
HPs Blog CSS quick fix
.sidebar {background: rgba(255,255,255,0.6) !important}
.aside.widget * { color: #333 !important;}
header.site-header * {color: #333 !important; }
### Keybase proof
I hereby claim:
* I am alexzeitler on github.
* I am alexzeitler (https://keybase.io/alexzeitler) on keybase.
* I have a public key whose fingerprint is 01A5 7471 EAD1 DB22 3216 D6F0 A98F CC5A 2F2C 2849
To claim this, I am signing this object:
@AlexZeitler
AlexZeitler / xmlstuff.cs
Last active August 29, 2015 14:17
XML (de)serialization
class Program
{
static void Main(string[] args)
{
// serialize
using (var stream = new FileStream(".\\test.xml", FileMode.Create))
new XmlSerializer(typeof(Customer)).Serialize(
stream,
new Customer() {
Name = "PDMLab",
@AlexZeitler
AlexZeitler / NuGet.config
Last active August 29, 2015 14:20
ASP.NET vNext beta4 NuGet config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetmaster/api/v2" />
<add key="NuGet" value="https://nuget.org/api/v2/" />
</packageSources>
</configuration>