(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
function switch_files { | |
mv $1.png $1.tmp.png | |
mv $1-inverse.png $1.png | |
mv $1.tmp.png $1-inverse.png | |
mv [email protected] [email protected] | |
mv [email protected] [email protected] | |
mv [email protected] [email protected] | |
} |
/* | |
* Trying to feature-detect (very naive) | |
* CSS Flexbox support. | |
* - Only most modern syntax | |
* | |
* Is this nonsense? | |
*/ | |
(function NaiveFlexBoxSupport(d){ | |
var f = "flex", e = d.createElement('b'); |
# we need some fixes from 14.10 | |
sudo add-apt-repository --enable-source ppa:libreoffice/libreoffice-4-3 | |
# fetch this repository | |
sudo apt-get update | |
# update your libreoffice installation | |
sudo apt-get install libreoffice | |
# get all build dependencies for libreoffice | |
sudo apt-get build-dep libreoffice | |
# that strangely enough doesn't come with the above | |
sudo apt-get install gcj-jdk python-dev |
<svg preserveAspectRatio="xMinYMin" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" | |
viewBox="0 0 560 1388"> | |
<defs> | |
<mask id="canTopMask"> | |
<image width="560" height="1388" xlink:href="img/can-top-alpha.png"></image> | |
</mask> | |
</defs> | |
<image mask="url(#canTopMask)" id="canTop" width="560" height="1388" xlink:href="can-top.jpg"></image> | |
</svg> |
#include <gtk/gtk.h> | |
#include <webkit/webkit.h> | |
static void destroyWindowCb(GtkWidget* widget, GtkWidget* window); | |
static gboolean closeWebViewCb(WebKitWebView* webView, GtkWidget* window); | |
static void | |
webkit_render_cb(WebKitWebView *webview, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.
As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.
function make_shipping_rates(id, low, mid, high) { | |
$.post('/admin/price_based_shipping_rates.json', { | |
price_based_shipping_rate: { | |
country_id: id, | |
min_order_subtotal: "0", | |
max_order_subtotal: "500", | |
name: "DHL Premiumversand", | |
offsets: [], | |
price: low | |
} |
<?php | |
/** | |
* Single level, Case Insensitive File Exists. | |
* | |
* Only searches one level deep. Based on | |
* https://gist.github.com/hubgit/456028 | |
* | |
* @param string $file The file path to search for. | |
* | |
* @return string The path if found, FALSE otherwise. |
#!/bin/bash -e | |
cd "${1-.}" | |
for f in *; do | |
if [[ $f == *@2x* ]]; | |
then | |
convert $f -resize 50% ${f//@2x/} | |
fi | |
done |