This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = angular.module('com.good.company.directive', []); | |
angular.module('com.good.company.directive') | |
.directive('myDirective', [ | |
// directive definition ... | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## You need to sudo this script, as it will install RPMs and run alternatives. | |
## You must accept the Oracle Binary Code License Agreement for Java SE to download this software. | |
## Read more here: http://www.oracle.com/technetwork/java/javase/terms/license/index.html | |
curl -L -H "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-linux-x64.rpm -o /tmp/jdk-8-linux-x64.rpm && \ | |
yum install -y /tmp/jdk-8-linux-x64.rpm && \ | |
rm -rf /tmp/jdk-8-linux-x64.rpm | |
## OpenJDK started using 18000XX as their priority, so kick it up to 2 million to surpass them. | |
## java ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adopted from http://jetpackweb.com/blog/2009/07/20/bash-script-to-create-mysql-database-and-user/ | |
# Replace $mysqlroot with root password | |
# Replace $dbname with database name | |
# Replace $dbuser with database user | |
# Replace $dbpasswd with password | |
mysql -u root -p$mysqlroot <<-EOF | |
CREATE DATABASE $dbname; | |
GRANT ALL PRIVILEGES ON $database.* TO '$dbuser'@'localhost' \ | |
IDENTIFIED BY '$dbpasswd'; | |
FLUSH PRIVILEGES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you've never run maven this folder doesn't exist yet. | |
mkdir ~/.m2 | |
# Provided from https://gist.github.com/voor/3b86d9dbea77d1d094fe#file-settings-xml | |
wget -o ~/.m2/settings.xml https://gist.githubusercontent.com/voor/3b86d9dbea77d1d094fe/raw/73dc13028f617fc86a28819cdd919c13d9f0a360/settings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# We run the first part twice, since the first time it's going to output a bunch of maven log stuff. | |
mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[' | grep -v 'Downloading:' | sed s/-SNAPSHOT// | |
export VERSION=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[' | grep -v 'Downloading:' | sed s/-SNAPSHOT//` | |
git checkout master | |
mvn release:update-versions -DdevelopmentVersion=$VERSION-development-SNAPSHOT # The version in master should already be something similar, $VERSION-SNAPSHOT | |
git commit -a -m "Updated development version to $VERSION-development-SNAPSHOT" | |
git checkout development | |
git merge master -m "Merging development version into development." | |
git checkout -b $VERSION-SNAPSHOT-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# KIOSK generator for Scientific Linux and CentOS (versions 5; 6 and 7) | |
# Created using Scientific Linux | |
# Wasn't made and never tested on different distros than SL/CentOS/EL! | |
# Version 1.4 for i386 and x86_64 | |
# | |
# Feel free to contact me: marcin@marcinwilk.eu | |
# www.marcinwilk.eu | |
# Marcin Wilk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; } | |
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; } | |
INSTALLED_ATOM=`rpm -q --queryformat '%{version}' atom` | |
LATEST_ATOM=`curl -s https://api.github.com/repos/atom/atom/releases/latest | jq --raw-output -c '.name'` | |
COMPARE=`printf "$INSTALLED_ATOM\n$LATEST_ATOM\n" | sort -V | tail -n1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Extract audio from the Video File into a file. | |
ffmpeg -i video.mp4 -map 0 -vn -acodec -copy video_audio.m4a | |
# Create 11 seconds of silence | |
ffmpeg -f lavfi -i aevalsrc=0:0::duration=11 -ab 320k silence.mp3 | |
# Prepend the silence to the audio track you downloaded | |
ffmpeg -i concat:"silence.mp3|commentary_audio.mp3" -codec copy silence_commentary_audio.mp3 | |
# Merge the commentary track with the video_audio into a single file | |
ffmpeg -i silence_commentary_audio.mp3 -i video_audio.m4a -filter_complex amerge -ac 2 -c:a libfdk_aac -vbr 4 merged_audio.m4a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/.npm-global | |
npm config set prefix '~/.npm-global' |
OlderNewer