This file contains 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
private Rectangle AdjustmentWindowBounds(Rectangle bounds) | |
{ | |
var workarea = Screen.FromRectangle(bounds).WorkingArea; | |
if (workarea.Contains(bounds) == false) | |
{ | |
if (bounds.Width > workarea.Width) | |
{ | |
bounds.Width = workarea.Width; | |
} |
This file contains 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
# author の一覧を取得 | |
svn log -q $URL | grep -v "^----" | cut -d "|" -f2 | sort | uniq | |
# 作業ディレクトリ内で実行する場合 | |
svn log -q | grep -v "^----" | cut -d "|" -f2 | sort | uniq |
This file contains 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 | |
class Lish_ErrorHandler_Thrown | |
{ | |
private $_original = false; | |
/** | |
* コンストラクタ | |
*/ | |
public function __construct() | |
{ |
This file contains 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 | |
RETVAL=0 | |
while read HASH_OLD HASH_NEW REFNAME; do | |
( | |
git log --format=format:"%H%x09%an%x09%ae" ${HASH_OLD}..${HASH_NEW} | |
echo | |
) | |
This file contains 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 | |
# | |
# GitLab | |
# Maintainer: @elvanja | |
# App Version: 2.8.2 | |
# chkconfig: 2345 82 55 | |
# processname: unicorn | |
# processname: rescue | |
# description: Runs unicorn and resque for nginx integration. |
This file contains 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 | |
nohup sh -c 'cd /var/lib/redmine;sudo -u nobody rake redmine:fetch_changesets RAILS_ENV=production' 1> /dev/null 2>&1 & |
This file contains 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 | |
class Hoge | |
{ | |
protected $_val; | |
public function __construct($val) | |
{ | |
$this->_val = $val; | |
} |
This file contains 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 | |
function import($ns, $klass) | |
{ | |
$ref = new ReflectionClass($klass); | |
$methods = $ref->getMethods(ReflectionMethod::IS_STATIC | ReflectionMethod::IS_PUBLIC); | |
$code = "namespace $ns;\n"; | |
/* @var $method ReflectionMethod */ | |
foreach ($methods as $method) |
This file contains 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 | |
/* | |
* example) | |
* sudo php setuidgid.php apache test.php | |
* | |
*/ | |
try | |
{ | |
if ($argc <= 2) |
OlderNewer