These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
# added hackery to work around wordpress issues - Patrick Anderson (patrick@trinity-ai.com) | |
# clearly this could be cleaner, but it does work | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
# patch Php from rack-legacy to substitute the original request so | |
# WP's redirect_canonical doesn't do an infinite redirect of / |
#!/usr/bin/env bash | |
echo '=========================== ' | |
echo 'This script will attempt to install on a blank Debian Lenny / Squeeze: ' | |
echo ' ' | |
echo 'RVM with Ruby 1.9.2 ' | |
echo 'NodeJS v0.4.10 with NPM and Coffee-Script ' | |
echo 'MongoDb for the DB ' | |
echo 'Imagemagick for the MiniMagick gem ' | |
echo 'Passanger with nginx ' |
window.stainedPaper = function (func) { | |
var canvas = document.createElement('canvas'); | |
document.body.appendChild(canvas); | |
paper.setup(canvas); | |
func.call(paper); | |
}; |
The normal controller/view flow is to display a view template corresponding to the current controller action, but sometimes we want to change that. We use render
in a controller when we want to respond within the current request, and redirect_to
when we want to spawn a new request.
The render
method is very overloaded in Rails. Most developers encounter it within the view template, using render :partial => 'form'
or render @post.comments
, but here we'll focus on usage within the controller.
archive_github_repo() | |
{ | |
if [ ! -d .git ]; then | |
echo "You must run this from within the root of your git repo." | |
exit 1 | |
fi | |
pwd=`pwd` | |
repo_url=`git config --local --get remote.origin.url` | |
repo_name=`echo $repo_url | awk -F / '{print $2}' | sed -e s/.git//` |
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'rubygems' | |
# https://github.com/jnunemaker/google-weather/ | |
# gem install google-weather | |
require 'google_weather' | |
# usage: outside_temp.rb [City,Province|Postal Code] | |
if ARGV.size == 0 |
delete-branch() | |
{ | |
for i in `echo $*`; do | |
echo "Deleting local and remote branch $i..." | |
git push origin :$i | |
git branch -D $i | |
done | |
} |
This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like
pipewire-debian
, you might get into conflicts.
Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.
Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.
Based on Debian Wiki, but simplified for Ubuntu 22.04.