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 | |
# @see https://github.com/hatena/Git-for-Designers | |
# @see http://blog.asial.co.jp/845 | |
read -p "user name: " name | |
git config --global user.name "`echo $name`" | |
read -p "user email: " email | |
git config --global user.email "`echo $email`" |
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 perl | |
use v5.12; | |
use warnings; | |
print 'Enter a string: '; | |
my $str = <STDIN>; | |
print 'Enter a number of times: '; | |
chomp(my $num = <STDIN>); | |
print $str x $num; |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | |
<style> | |
h1, | |
h2, | |
h3, | |
h4, |
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 | |
$your_birthday = '';//type your birthday here e.g.:'2013/05/11' | |
$today = new DateTime(); | |
$birthday = new DateTime($your_birthday); | |
$interval = $today->diff($birthday, true); | |
echo $interval->format('your birthday is %m months and %d days ahead'); |
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; | |
open(FILE, 'index.php') or die "$!"; | |
while (my $line = <FILE>) { | |
unless ($line =~ /[^(\s|\t|\n)]/g) { | |
$line =~ s/(\s|\t|\n)//g; | |
} | |
print $line; |
NewerOlder