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 | |
################################################################################ | |
## | |
## Title: Oracle Java Installer | |
## | |
## Date: 03/27/2015 | |
## Author: Mike G. aka metalcated and partially forked from n0ts | |
## Version: 0.2 | |
## | |
################################################################################ |
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 | |
set -a | |
player="libflashplayer.so" | |
work_dir="/tmp/flash_update" | |
mozilla_dir="$HOME/.mozilla/plugins" | |
download_player() { | |
tarball="install_flash_player_11_linux.x86_64.tar.gz" | |
wget -nc "https://fpdownload.macromedia.com/get/flashplayer/current/licensing/linux/$tarball" |
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 | |
## Bash script to migrate from a SQLite database to a MySQL database | |
## based on vidalon/migrate_sqlite_to_mysql.sh (https://gist.github.com/vidalon/2961155) | |
## Change VARIABLES to yours to execute the script | |
SQLITE_SDB_FILE=/tmp/weewx.sdb | |
SQLITE_FILE=/tmp/swallow.sql | |
MYSQL_USER=weewx | |
MYSQL_DATABASE=weewx |
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
path="." | |
for link in $(find "$path" -type l); do | |
ln -f $(readlink -f $link) $link | |
done | |
echo "Converted hard links from symlinks:" | |
find "$path" -type f -printf '%n %p\n' | awk '$1 > 1{$1="";print}' |
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 | |
# LDAP-server | |
host="ldap.example.org" | |
# User for auth | |
user="CN=YourUser,CN=Users,DC=ldap,DC=example,DC=org" | |
# Password of User | |
pass="YourPass" | |
# LDAP base name | |
base_name="OU=WhereToSearch,DC=ldap,DC=example,DC=org" |
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 groovy | |
def jenkins_cli = "/var/jenkins_home/war/WEB-INF/jenkins-cli.jar" | |
def jenkins_url = "http://127.0.0.1:8080/" | |
def admin_email = "admin@domain.com" | |
def credentials = "--username \"someuser\" --password \"somepass\"" | |
node { | |
properties( | |
[ |
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 | |
project_name="my-project" | |
# Full path to your svn repo or path in repo | |
svn_repo="https://server.svn/repos/my-project" | |
trunk_path="/trunk" | |
tags_path="/tags" | |
branches_path="/branches" | |
default_email_suffix="@my.company" | |
git_repo="ssh://git@bitbucket.git:7999/my-project.git" |
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 | |
# set empty repo with enabled pre-revprop-change hook | |
# set first last revisions to dump and migrate | |
first_rev='1' | |
last_rev='15' | |
# range of revisions of old repo to migrate | |
revs="$(svn log -q -r$first_rev:$last_rev | grep -oE '^r[0-9]+' | tr -d 'r' | sort -n)" |
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 groovy | |
payload = """ | |
{ | |
"title": "Updating Toolchain", | |
"description": "Need to deploy new versions of toolchain after succesful build.", | |
"state": "OPEN", | |
"open": true, | |
"closed": false, | |
"fromRef": { |
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 | |
# Add this script to crontab: | |
# * * * * * username suspend-when-lid-is-closed.sh | |
if grep -q closed /proc/acpi/button/lid/LID0/state; then | |
echo "lid is closed, suspending..." > /tmp/suspend-when-lid-is-closed.log | |
systemctl suspend | |
fi |
OlderNewer