Skip to content

Instantly share code, notes, and snippets.

View nyluntu's full-sized avatar

Turo Nylund nyluntu

View GitHub Profile
@nyluntu
nyluntu / wp.sh
Last active March 9, 2024 13:19 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from.
#!/bin/bash
# Script to install multiple Wordpress instances into single web server.
#
# TODO: If using bitnami lamp stack, disable pagespeed module because can confuse students when js/css files are cached.
# https://docs.bitnami.com/bch/apps/wordpress/administration/use-pagespeed/
#
# REQUIREMENTS
#
# LAMP environment installed. Script is tested with Bitnami LAMP stack.
@nyluntu
nyluntu / Animation Fade
Created July 4, 2018 21:43 — forked from aloisdeniel/Animation Fade
Xamarin.iOS view common animations
public static void Fade (this UIView view, bool isIn, double duration = 0.3, Action onFinished = null)
{
var minAlpha = (nfloat)0.0f;
var maxAlpha = (nfloat)1.0f;
view.Alpha = isIn ? minAlpha : maxAlpha;
view.Transform = CGAffineTransform.MakeIdentity ();
UIView.Animate (duration, 0, UIViewAnimationOptions.CurveEaseInOut,
() => {
view.Alpha = isIn ? maxAlpha : minAlpha;
@nyluntu
nyluntu / git-line-add-delete-per-day.sh
Created October 23, 2017 23:48 — forked from yuan3y/git-line-add-delete-per-day.sh
Get number of lines added and deleted per day from your git repo
#!/bin/bash
ds() {
date --date="$1 days ago" +%Y-%m-%d
}
BRANCH=master # your branch here
echo "Date,LinesAdded,LinesDeleted"
for day in $(seq 1 10)