Unsere Setup-Routine für eine Rails-App mit Nginx, Passenger, rvm auf einen Host Europe-VPS mit Ubuntu 10.4.
apt-get update
apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \
#!/bin/sh | |
git clone https://github.com/laravel/laravel.git $1 | |
cd $1 | |
# Required for getting L4 dev | |
git reset --hard HEAD | |
git checkout develop | |
git remote rename origin upstream |
document.getElementsByTagName('button')[0].onclick = function () { | |
scrollTo(document.body, 0, 1250); | |
} | |
function scrollTo(element, to, duration) { | |
var start = element.scrollTop, | |
change = to - start, | |
currentTime = 0, | |
increment = 20; | |
# First, Install Vagrant and Virtualbox then: | |
# Create new project directory | |
mkdir -p ~/Sites/newproject # Create new project directory | |
mk ~/Sites/newproject # Go into your new project directory | |
# Setup Vagrant | |
vagrant init | |
# Edit vagrant file box and box url to install Ubuntu, just like https://gist.github.com/fideloper/dab171a2aa646e86b782#file-vagrantfile-share-var-www-rb-L6-L8 | |
# Edit Vagrantfile to create a static IP address, just like https://gist.github.com/fideloper/dab171a2aa646e86b782#file-vagrantfile-share-var-www-rb-L10 |
// Create Base64 Object | |
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r |
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
- name the file as you please, does not matter | |
- ensure the file is owned by root:wheel or it will not be used | |
It will create a loopback device 10.254.254.254 which can be used a remote_host in containers like xdebug configuration | |
- configure xdebug the way shown below. | |
Why all this? | |
- docker for mac will not allow to use connect_back | |
- you would need to use the user-specific ip of the current users interface ( eth/wlan ) in remote_host .. this way either your bootstrap becomes utterly complex or the dev images are not portable from developer to developer |
#import <AZSClient/AZSClient.h> | |
NSString *const AZURE_STORAGE_CONNECTION_STRING = @"DefaultEndpointsProtocol=https;AccountName=(your account name);AccountKey=(your account key);EndpointSuffix=core.windows.net"; | |
NSString *const AZURE_STORAGE_CONTAINER = @"files"; | |
NSString *const LOCAL_FILE_FILEPATH = @"/Users/dino/A.mp4"; | |
NSString *const LOCAL_FILE_FILENAME = @"A.mp4"; | |
NSError *error; | |
AZSCloudStorageAccount *account = [AZSCloudStorageAccount accountFromConnectionString:AZURE_STORAGE_CONNECTION_STRING error:&error]; | |
AZSCloudBlobClient *client = [account getBlobClient]; |