...
"require": {
"vendor/package": "1.3.2", // exactly 1.3.2 (exact)
// >, <, >=, <= | specify upper / lower bounds
"vendor/package": ">=1.3.2", // anything above or equal to 1.3.2
"vendor/package": "<1.3.2", // anything below 1.3.2
// * | wildcard
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
| ## Make /www directory | |
| ## Edith apache.conf | |
| <Directory /> | |
| #Options FollowSymLinks | |
| Options Indexes FollowSymLinks Includes ExecCGI | |
| AllowOverride All | |
| Order deny,allow | |
| Allow from all | |
| </Directory> |
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 | |
| # This script imports untrusted self signed certificates to you browser | |
| # usage: import-cert.sh remote.host.name [port] | |
| # | |
| REMHOST=$1 | |
| REMPORT=${2:-443} | |
| exec 6>&1 | |
| exec > $REMHOST | |
| echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | |
| certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "$REMHOST" -i $REMHOST |
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
| [a-zA-Z0-9_]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?!([a-zA-Z0-9]*\.[a-zA-Z0-9]*\.[a-zA-Z0-9]*\.))(?:[A-Za-z0-9](?:[a-zA-Z0-9-]*[A-Za-z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])? |
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
| <?php | |
| // Usage | |
| // Get Request | |
| // pool(['url1',''url2','url3']) | |
| // | |
| // Post Request | |
| // $data[0]['url'] = 'endpoint1'; | |
| // $data[0]['post'] = []; | |
| // $data[0]['post']['param1'] = ['paramValue1']; |
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
| #Searchin for particular words in linux | |
| grep -rn "search_word" /tmp/ | |
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 bash | |
| # Basic info | |
| IP=`hostname -I | awk '{print $1}'` | |
| HOSTNAME=`uname -n` | |
| #ROOT=`df -Ph | grep xvda1 | awk '{print $4}' | tr -d '\n'` | |
| ROOT=`df -Ph | grep vda1 | awk 'NR==1{print $4}' | tr -d '\n'` | |
| # System load | |
| MEMORY1=`free -t -m | grep Total | awk '{print $3" MB";}'` |
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
| # Ubuntu 15.04+ | |
| [Unit] | |
| Description=Setup a secure tunnel to server | |
| Wants=network-online.target | |
| After=network-online.target | |
| [Service] | |
| User=admin | |
| Environment="LOCAL_ADDR=localhost" |
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
| #colorful prompt with git branch names | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' |
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
| -- Weigh rows against eachother based on different conditions, | |
| -- ordering the results based on their given weights so that | |
| -- more precise matches will show higher up in the results. | |
| -- In this example, an exact match will show up at the top | |
| -- of the results, a match at the beginning of the string | |
| -- will show next, and a match anywhere will show last. | |
| set @query = 'Liam'; |
OlderNewer