$ export http_proxy=http://example.com:8080/
$ export https_proxy=$http_proxy
$ sudo -E sh -c "echo 'Acquire::http::proxy \"$http_proxy\";' >> /etc/apt/apt.conf"
$ sudo -E sh -c "echo 'Acquire::https::proxy \"$https_proxy\";' >> /etc/apt/apt.conf"
$ wget https://raw.githubusercontent.com/progrium/dokku/v0.4.3/bootstrap.sh
$ sudo -E DOKKU_TAG=v0.4.3 bash bootstrap.sh
This file contains hidden or 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 | |
# Database migration script for Sakura to Any | |
SRC_IS_SSH_USE=1 | |
SRC_SSH_SAKURA_USER="example" | |
SRC_SSH_HOST="${SRC_SSH_SAKURA_USER}.sakura.ne.jp" | |
SRC_SSH_USERNAME="${SRC_SSH_SAKURA_USER}" | |
SRC_SSH_PASSWORD="foobar" | |
SRC_DB_HOST="mysql0000.db.sakura.ne.jp" |
This file contains hidden or 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 | |
# FTP directory clone script for Unix OS | |
# Required: bash & wget command | |
# https://gist.github.com/mugifly/931624e375d40267afc4 | |
# Copy source (Remote FTP server) | |
SRC_HOST="example.com" | |
SRC_USERNAME="xxxx" | |
SRC_PASSWORD="yyyy" | |
SRC_DIRECTORY="/home/xxxx/src" |
This file contains hidden or 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 | |
# Simple inspector for Docker container IP address | |
# https://gist.github.com/mugifly/3bb1c54b48764340eda8 | |
print_help () { | |
echo -e "USAGE: docker-container-ip.sh KEYWORD\n" | |
echo "KEYWORD: A keyword string for target container." | |
echo " e.g. dokku.mysql.foobar" | |
echo -e "\n[Example usecases]" | |
echo " Connect to MySQL database in container:" |
This file contains hidden or 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 container for whole process | |
box: ubuntu | |
# Additional services | |
services: | |
- id: mysql | |
env: | |
MYSQL_ROOT_PASSWORD: test | |
MYSQL_USER: test | |
MYSQL_PASSWORD: test |
This file contains hidden or 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
# Maintainer: Masanori Ohgita <mp_aur[at]ohgita[dot]info> | |
pkgname=odenwlan-node | |
pkgver=1.3.0 | |
pkgrel=1 | |
pkgdesc="An automatic login tool for Wi-Fi of OECU" | |
url="https://github.com/odentools/odenwlan-node/" | |
arch=('i686' 'x86_64') | |
license=('MIT') | |
depends=('nodejs>=4.1.1' 'npm>=3.3.4') | |
makedepens=('git') |
This file contains hidden or 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
box: node | |
build: | |
steps: | |
- npm-install | |
- npm-test | |
- script: | |
name: echo nodejs information | |
code: | | |
echo "node version $(node -v) running" | |
echo "npm version $(npm -v) running" |
This file contains hidden or 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 perl | |
# Detector for animated GIF image (perl5) | |
# Based on http://d.hatena.ne.jp/namanamanamana/20090415/1239729068 Thanks. | |
use strict; | |
use warnings; | |
use LWP::UserAgent; | |
# Fetch a GIF image | |
my $ua = LWP::UserAgent->new(); | |
my $res = $ua->get('http://example.com/foo-animation.gif'); |
This file contains hidden or 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
var $ = require('jquery')(require('jsdom-no-contextify').jsdom().parentWindow); | |
// Support for Cross-domain request with using jQuery | |
// See: http://garajeando.blogspot.jp/2012/06/avoiding-xmlhttprequest-problem-using.html | |
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | |
$.support.cors = true; | |
$.ajaxSettings.xhr = function () { | |
return new XMLHttpRequest; | |
} |
This file contains hidden or 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
-- FlashAir Lua objects dumper | |
-- For FlashAir 3rd generation or newer | |
-- 1. Put this file to the root directory of the card | |
-- 2. Connect to card. Then access to http://flashair/dumper.lua | |
print("HTTP/1.0 200 OK\r\n\r\n") | |
for i,v in pairs(_G) do | |
print(i) | |
print(v) | |
local t = type(v) |