Skip to content

Instantly share code, notes, and snippets.

View saimonmoore's full-sized avatar

Saimon Moore saimonmoore

View GitHub Profile
#!/bin/bash
# https://github.com/ufal/lindat-dspace/wiki/Building-Shibboleth-with-FastCGI-support
# ensure the versions are still latest
sudo apt-get install libfcgi-dev libboost-all-dev openssl libssl-devc
INSTALLDIR=/opt/shibboleth-sp-fastcgi
function get {
local dirname=$1
# Setup your iOS projects for testing
![image](http://www.gibedigital.com/media/1280/unit-test.jpg)
Although in other programming communities, like Ruby, developers are more aware of testing newly implemented components in the app, in mobile app development, ensuring every component is tested **is not common** within the community.
Fortunately a bunch of iOS developers have been working over the years to bring that culture to iOS too, **offering new libraries** that use native ones to allow you to write your tests with a fresh and more readable syntax. This has provided a big impulse and every day more and more developers ensure that expected behaviour in their apps is tested.
In the **Redbooth iOS Team** we were strongly influenced by the Ruby backend team and decided to have introduce testing into our development flow. Thanks to components, like *Cocoapods*, the use of *Schemes and targets*, and some other tools, testing has become an essential component for us.

Different services I can suggest when a non-tech friend or family member asks me how they can cheaply make a website and possibly use it to sell stuff online.

Website Hosting

// Build the https based part & read the key and crt file that is required to encrypte the server / client connection
var ssl = https.createServer({
key: fs.readFileSync( "./ssl/ssl.private.key" ).toString()
, cert: fs.readFileSync( "./ssl/ssl.crt" ).toString()
});
// This is the part what it's all about, we are going to route all
// https based requires to the default app handler
ssl.addListener( "request", function sllRequestListener( req, res ){
req.ssl = true; // just add an extra flag so we can see if it was forwarded from https
########################################################################
### Rakefile for encrypted passwords
########################################################################
#
# Here's a little Rakefile to manage your encrypted password file! It's
# really easy to use:
#
# 1) put the email addresses of the keys you want in AUTHORIZED_USERS
# 2) create a passwords.txt (and ignore it in your SCM)
# 3) run `rake passwords:encrypt`
@saimonmoore
saimonmoore / core_helper.rb
Created September 20, 2010 12:46 — forked from ice799/core_helper.rb
CoreHelper - lots of info before core dumps
#!/custom/ree/bin/ruby
# USAGE:
#
# echo "|/path/to/core_helper.rb %p %s %u %g" > /proc/sys/kernel/core_pattern
#
require 'etc'
require 'net/smtp'
@saimonmoore
saimonmoore / 0_notes.txt
Created June 18, 2010 20:44 — forked from wayneeseguin/0_notes.txt
rvmrc + bundler
This is an example of using RVM's Project .rvmrc file
to have it automatically bootstrap your environment, including bundler.
This could be further expanded to do anything you require :)
The important thing to remember is that the purpose of these files is
to allow you to very easily have your 'project context' (aka 'environment')
loaded automatically for you when you enter the project in the shell (cd).
You can generate the .rvmrc file below by running:
@saimonmoore
saimonmoore / gist:440328
Created June 16, 2010 08:27 — forked from sstephenson/gist:439777
device_scale for ios
// Provides a device_scale class on iOS devices for scaling user
// interface elements relative to the current zoom factor.
//
// http://37signals.com/svn/posts/2407-device-scale-user-interface-elements-in-ios-mobile-safari
// Copyright (c) 2010 37signals.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# Everything you need to do to get started with Rails 2.3.8
#
# As of June 14th, 2010 @ 2:30 p.m. MST
#
# This gist now features instructions to get Rails 3 up and running with:
# - Ruby 1.8.7-p174
# - Bundler 0.9.26
# - Cucumber 0.8.0
# - Rspec 1.3.0 + Rspec-Rails 1.3.2
# - RVM