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
| #!/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 | |
|  | |
| 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. |
| for f in $(find ~/dotfiles -type f -iname '.*'); do f_=$(basename $f); ln -nfs ~/dotfiles/$f_ ~/$f_; done |
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` |
| #!/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' |
| 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: |
| // 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 |