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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <!-- Standard Meta --> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
| <!-- Site Properties --> |
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
| Namespace Utils | |
| Public Class BusyProcess | |
| Implements IDisposable | |
| Private form As Form | |
| Public Sub New(form As Form) | |
| Me.form = form | |
| Me.form.Cursor = Cursors.WaitCursor | |
| End Sub | |
| Public Sub Dispose() Implements IDisposable.Dispose |
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 | |
| dir=$(dirname $0) | |
| backup_dir=$dir/../backup/crontab | |
| mkdir -p $backup_dir | |
| cp $backup_dir/crontab-backup $backup_dir/crontab-backup.1 | |
| crontab -l > $backup_dir/crontab-backup | |
| diff -Nu $backup_dir/crontab-backup.1 $backup_dir/crontab-backup >> $backup_dir/crontab-history |
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
| var execAfter = function(test, proc) { | |
| var timer = setInterval(function(){ | |
| if (test()) { | |
| clearInterval(timer); | |
| proc(); | |
| return; | |
| } | |
| }, 500); | |
| }; |
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/perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use Data::Dumper; | |
| die 'no argument.' if scalar @ARGV < 1; | |
| my $check_path = $ARGV[0]; | |
| my $uses = `fgrep -r 'use ' $check_path | sed -e 's/.*use \\([A-Z][a-zA-Z0-9:]\\+\\).*/\\1/' | grep -v '^/' | sort | uniq`; |
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
| find . -name '*.ext' | xargs -n 1 perl -pi.bak -e 's/before string/after string/' |
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
| for f in *.php; do n=${f%.*}; mv $n.php $n.tx; done; |
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
| msgid "hello" | |
| msgstr "konnnitiwa" |
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 | |
| if [ $# == 0 ]; then | |
| echo "usage: $1 <ssl cert file>" | |
| exit 1 | |
| fi | |
| FILENAME=$1 | |
| if [ ! -f "$FILENAME" ]; then | |
| echo "ERROR: <ssl cert file> not exists. $FILENAME" | |
| exit 1 |
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
| (defn fib [n] | |
| (cond | |
| (< n 0) (throw (IllegalArgumentException. "fib argument must be plus number.")) | |
| (= n 1) 1 | |
| (= n 2) 1 | |
| :else (+ (fib (- n 2)) (fib (- n 1))))) | |
| (loop [x 1] | |
| (if (< x 10) | |
| (do |