This is an alias to shells to display mount output in formatted columns.
Add this alias to your rc shell(.bashrc, .zshrc, or whatever):
alias mountc='mount | column -t | sort -V'
Example output:
$LogPath = "C:\inetpub\logs\LogFiles\W3SVC1\*" | |
$LogFiles = "*.log" | |
[int] $LogRetention = "-30" # in Days | |
Get-ChildItem $LogPath -Include $LogFiles -Recurse | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays($LogRetention)} | Remove-Item |
$ sudo apt-get install cryptsetup # or on redhat - yum install cryptsetup-luks | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
cryptsetup is already the newest version (2:1.6.6-5ubuntu2). | |
0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded. | |
$ truncate -s 100m myencryptedcontainer | |
$ cryptsetup -y -v luksFormat myencryptedcontainer |
This is an alias to shells to display mount output in formatted columns.
Add this alias to your rc shell(.bashrc, .zshrc, or whatever):
alias mountc='mount | column -t | sort -V'
Example output:
<?php | |
/** | |
* Simple request response script | |
* | |
* Point you cURL request to this script to see all incoming data | |
*/ | |
echo '*API*'. PHP_EOL; |
{# style 1 - long form #} | |
{% if filepath == '/var/opt/tomcat_1' %} | |
{% set tomcat_value = tomcat_1_value %} | |
{% else %} | |
{% set tomcat_value = tomcat_2_value %} | |
{% endif %} | |
{# style 2 - short form #} | |
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %} |
// Seeing this through jsfiddle? | |
// Get the source from github gist: https://gist.github.com/1873879 | |
// Create an array with two jqXHR objects from two separate $.ajax calls. | |
var arrJqx = []; | |
// This call has no delay and the response will come back from the server | |
// almost immediately. | |
arrJqx.push($.ajax ({ | |
url: "/echo/json/", |
As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!
$ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
#!/bin/bash | |
#usage: mysql-drop-all-tables -d database -u dbuser -p dbpass | |
TEMP_FILE_PATH='./drop_all_tables.sql' | |
while getopts d:u:p: option | |
do | |
case "${option}" | |
in |
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @ORM\Entity() | |
* @ORM\Table(name="user") | |
*/ | |
class User |