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
/*Editor*/ | |
#write { | |
max-width: 700px; | |
margin: 0 auto; | |
padding: 30px; | |
padding-bottom: 100px; | |
} | |
/*Preview*/ | |
body { | |
font-family: -apple-system, helvetica, sans-serif; |
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
if [[ ! -o interactive ]]; then | |
return | |
fi | |
compctl -K _rbenv rbenv | |
_rbenv() { | |
local word words completions | |
read -cA words | |
word="${words[2]}" |
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
#Variable declaration | |
$vCenterIPorFQDN="192.168.243.40" | |
$vCenterPort="443" | |
$vCenterUsername="[email protected]" | |
$vCenterPassword="vmware" | |
$DatacenterFolder="DCFolder" | |
$DatacenterName="Datacenter" | |
$MgmtClusterName="MgmtCluster" | |
$OpenStackClusterNames=@("OpenStackCluster") #Cluster(s) managed by OpenStack | |
$MgmtHosts= @("192.168.243.144") #IP or FQDN of hosts participating in Management Cluster |
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 | |
# | |
# 通过对比 ping 响应时间,找到本机最快的上传ip | |
# [email protected] | |
# | |
function refresh_host() | |
{ | |
IP="$1" | |
UPLOAD_HOST="upload.qiniu.com" |
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
--- | |
# Data needed for Class['openstack::compute'] | |
# The IP and interface that external sources will use to communicate with the instance and hypervisors. | |
openstack::compute::public_interface: 'eth0' | |
openstack::compute::internal_address: "%{ipaddress_eth0}" | |
openstack::compute::iscsi_ip_address: "%{ipaddress_eth0}" | |
# The interface that will handle instance to intance communication and instance outbound traffic. | |
openstack::compute::private_interface: 'eth1' |
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
# Folder view configuration files | |
################### | |
.DS_Store | |
.DS_Store? | |
Desktop.ini | |
# Thumbnail cache files | |
################### | |
._* | |
Thumbs.db |
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
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
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
1. Install | |
sudo apt-get install youtube-dl | |
sudo apt-get install libavcodec-extra-53 | |
2. Download video | |
-Single video | |
youtube-dl -f 18 <URL> | |
-Batch | |
youtube-dl -a filename.txt | |
3. Check all supported video formats for a youtube video | |
youtube-dl -F <URL> |
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 ruby | |
require 'cgi' | |
def video_token(video_id) | |
token = CGI.parse(%x!curl http://www.youtube.com/get_video_info?video_id=#{video_id}!)['token'][0] | |
end | |
def video_id(url) | |
CGI.parse(url.split('?')[1])['v'] |
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/sh | |
# | |
# git autodeploy script when it matches the string "[deploy]" | |
# | |
# @author icyleaf <[email protected]> | |
# @link http://icyleaf.com | |
# @version 0.1 | |
# | |
# Usage: | |
# 1. put this into the post-receive hook file itself below |
NewerOlder