Skip to content

Instantly share code, notes, and snippets.

View stikmanw's full-sized avatar

Ben Carter stikmanw

View GitHub Profile
CMD=$1;
if [[ `id -u` = 0 ]]; then
echo "You mustn't be root when executing this script";
exit;
fi
function usage {
echo "Usage: $(basename $0) COMMAND
COMMANDS:
@stikmanw
stikmanw / php.gitignore
Last active August 29, 2015 14:23
Common PHP .gitignore
*.swo
*.swp
*.kpf
*.nfs*
.cache
.project
.settings
Thumbs.db
.DS_Store
.buildpath
@stikmanw
stikmanw / Sphero Agent Error
Created March 31, 2015 19:23
Error after Sphero Client call
=ERROR REPORT==== 31-Mar-2015::15:21:39 ===
** Generic server <0.156.0> terminating
** Last message in was {roll,500,170}
** When Server state == #{'__struct__' => 'Elixir.Sphero.Client.State',
device => <0.157.0>,
seq => 0}
** Reason for termination ==
** {badarg,[{erlang,apply,
[#{'__struct__' => 'Elixir.Sphero.Client.State',
device => <0.157.0>,
@stikmanw
stikmanw / ZS9 - PSR-0 Profile
Created April 10, 2013 12:29
Almost PSR-0 formatter... misses a few things that need to manually be keyed but handles most spacing formatting issues.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles>
<profile name="psr-0">
<setting id="com.zend.php.core.formatter.insert_new_line_in_function_invoke" value="3"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_force_split" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_indent_policy" value="0"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_line_wrap_policy" value="0"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_force_split" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_indent_policy" value="0"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_line_wrap_policy" value="0"/>