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
    
  
  
    
  | # Get arp table cache | |
| arp -n | |
| # Clean arp cache verbose | |
| ip -s -s neigh flush all | |
| # Delete special ip from arp cache | |
| arp -d 192.168.1.1 | |
| # Add static route to arp cache | 
  
    
      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
    
  
  
    
  | .group { | |
| margin-top: 3em; | |
| position:relative; | |
| width: 100%; | |
| display: inline-block; | |
| } | |
| .group>input, .group>textarea { | |
| font-size:110%; | |
| padding: .5rem; | |
| display:block; | 
  
    
      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 | |
| source='git@github.com' | |
| dest='ssh://git@git.destination.server' | |
| repos="repo1 repo2 repo3 repo4" | |
| for repo in $repos; do | |
| git clone $source/$repo.git | |
| cd $repo && git fetch origin | |
| branches=$(git branch -a | grep remotes) | |
| for branch in $branches; do | 
  
    
      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 import - image-name < app-server.tar | |
| docker run -i -t image-name /bin/bash | 
  
    
      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 | |
| source_dir='.' | |
| file_ptrn='*.webm' | |
| dest_dir='truncated' | |
| for file in $(find -L $source_dir -name $file_ptrn); do | |
| s=$(avconv -i $file 2>&1 | grep -o -E '|Duration: [^.]+|') | |
| sec=${s##*:} | |
| s=${s%:*} | |
| min=${s##*:} | |
| duration=$(( ${sec#0} + ${min#0} * 60 )) | 
  
    
      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
    
  
  
    
  | function array_diff_multi($arr1, $arr2) { | |
| $result = array(); | |
| foreach ($arr1 as $k=>$v) { | |
| if(!isset($arr2[$k])) { | |
| $result[$k] = $v; | |
| } else { | |
| if (is_array($v) && is_array($arr2[$k])) { | |
| $diff = array_diff_multi($v, $arr2[$k]); | |
| if (!empty($diff)) | |
| $result[$k] = $diff; | 
  
    
      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
    
  
  
    
  | crop='500x400' | |
| convert input.jpg -resize $crop'^' -gravity center -crop $crop'+0+0' test.jpg | 
  
    
      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
    
  
  
    
  | /sbin/iptables -A INPUT -s 46.227.191.220 -j DROP | 
  
    
      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 | |
| declare -A TASK_TIME_MAP | |
| log() { | |
| echo "$(date +%Y-%m-%dT%T%z) $1" | |
| } | |
| load_time_map() { | |
| local task | |
| test ! -d .tasks && mkdir $_ | |
| for file in .tasks/*; do |