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/sh | |
# Scipt for installing mcrypt.so extension for PHP 5.3.13 (default PHP for OS X 10.8 Mountain Lion) | |
mkdir /tmp/gettext | |
cd /tmp/gettext | |
curl --location --progress-bar http://us.php.net/get/php-5.3.13.tar.gz/from/nl.php.net/mirror | tar -zx | |
brew update |
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/sh | |
# Scipt for installing mcrypt.so extension for PHP 5.3.13 (default PHP for OS X 10.8 Mountain Lion) | |
mkdir /tmp/mcrypt | |
cd /tmp/mcrypt | |
curl --location --progress-bar http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz/download | tar -zx | |
curl --location --progress-bar http://us.php.net/get/php-5.3.13.tar.gz/from/nl.php.net/mirror | tar -zx |
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/sh | |
rm -rf "$HOME/Library/Preferences/WebIde40" | |
rm -rf "$HOME/Library/Caches/WebIde40" | |
rm -rf "$HOME/Library/Application Support/WebIde40" | |
rm -rf "$HOME/Library/Logs/WebIde40" |
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 python | |
# -*- coding: utf-8 | |
""" | |
Search longest common substrings using generalized suffix trees built with Ukkonen's algorithm | |
Author: Ilya Stepanov <code at ilyastepanov.com> | |
(c) 2013 | |
""" |
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 | |
# this is the source folder. We want to copy its content to a Docker volume. | |
SRC_PATH='/opt/docker/gitlab/data' | |
# this is target volume name. Assuming it's not been created yet. | |
VOLUME_NAME='gitlab-data' | |
tar Ccf $(dirname $SRC_PATH) - $(basename $SRC_PATH) | docker run -i --rm -v $VOLUME_NAME:/data debian tar Cxpf /data - --strip-components=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
{{ define "upstream" }} | |
{{ if .Address }} | |
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}} | |
{{ if and .Container.Node.ID .Address.HostPort }} | |
# {{ .Container.Node.Name }}/{{ .Container.Name }} | |
server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }}; | |
{{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}} | |
{{ else if .Address.IP }} | |
# {{ .Container.Name }} | |
server {{ .Address.IP }}:{{ .Address.Port }}; |
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 python | |
import os | |
import datetime | |
address = '8.8.8.8' | |
ping_timeout = 5 | |
attempts = 4 | |
log_file = '/var/log/ping_test.log' |
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
for D in `find . -type d` | |
do | |
pushd "$D" | |
for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done | |
popd | |
done |
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
docker exec -ti gitlab bash | |
cd /home/git/gitlab | |
sudo -u git -H bundle exec rails console production | |
User.find_each(&:disable_two_factor!) |
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 | |
# stop execution if error | |
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
# pre-requirements | |
apt-get update | |
apt-get upgrade -y |
OlderNewer