Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/perl | |
# | |
# Pre-commit hook for running checkstyle on changed Java sources | |
# | |
# To use this you need: | |
# 1. checkstyle's jar file somewhere | |
# 2. a checkstyle XML check file somewhere | |
# 3. To configure git: | |
# * git config --add checkstyle.jar <location of jar> | |
# * git config --add checkstyle.checkfile <location of checkfile> |
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software. | |
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module | |
# This module "secure-link" helps you to protect links from stealing away. | |
# | |
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg | |
cd /usr/src | |
wget http://nginx.org/download/nginx-1.5.13.tar.gz | |
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz |
#!/bin/sh | |
ProgName=$(basename $0) | |
sub_help(){ | |
echo "Usage: $ProgName <subcommand> [options]\n" | |
echo "Subcommands:" | |
echo " bar Do bar" | |
echo " baz Run baz" | |
echo "" |
# download and install Oh-my-ZSH | |
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh | |
# make zsh your default shell | |
chsh -s /bin/zsh |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
<?php | |
$file = '/path/to/file.png'; | |
$filename = basename($file); | |
$upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
if (!$upload_file['error']) { | |
$wp_filetype = wp_check_filetype($filename, null ); | |
$attachment = array( | |
'post_mime_type' => $wp_filetype['type'], | |
'post_parent' => $parent_post_id, |
art_url="https://artifactory.company.com/artifactory" | |
user="user" | |
pass="password" | |
function upload { | |
local_file_path=$1 | |
target_folder=$2 | |
if [ ! -f "$local_file_path" ]; then |
/* Vertically aling on ion-content */ | |
.center { | |
border: 1px solid red; | |
display: -webkit-box; | |
display: -moz-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-box-direction: normal; | |
-moz-box-direction: normal; |