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
pr() { | |
pr=$(gh pr list --limit 20 | fzf --height 40% --reverse --border | awk '{print $1}') | |
if [ -n "$pr" ]; then | |
current_user=$(git config user.name) | |
gh pr review "$pr" --approve -b "Reviewed by: $current_user" | |
gh pr merge "$pr" --body "Accepted by: $current_user" | |
else | |
echo "No PR selected." | |
fi | |
} |
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
[ | |
{iso: 'NZ',name: 'New Zealand', }, | |
{iso: 'AU',name: 'Australia', }, | |
{iso: 'US',name: 'United States', }, | |
{iso: 'GB',name: 'United Kingdom', }, | |
{iso: 'AF',name: 'Afghanistan', }, | |
{iso: 'AX',name: 'Åland Islands', }, | |
{iso: 'AL',name: 'Albania', }, | |
{iso: 'DZ',name: 'Algeria', }, | |
{iso: 'AS',name: 'American Samoa', }, |
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
# Note, works best if your engine name isn't reserved | |
# Rename in files | |
find ~/www/rails/engines/old_engine/ -type f | xargs sed -i s/Old/New/g | |
find ~/www/rails/engines/old_engine/ -type f | xargs sed -i s/old/new/g | |
# Remove -n to run command | |
find ~/www/rails/engines/old_engine -type f -name '*' -print0 | xargs -0 rename -n 's/(.*)old\.(.*)/$new\.$2/g'; |
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 formatOptionGroups($raw_option_groups) { | |
//Normalise everything | |
$return = [ | |
'option_groups' => [], | |
'option_types' => [], | |
'option_values' => [], | |
'option_prices' => [], | |
]; | |
//Foreach Group (eg Size/Simple Prong) |
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 | |
namespace JoeSwann; | |
class VendBase { | |
public function __construct(&$app, $settings = array()) { | |
$this->app = $app; | |
$this->settings = $settings; | |
$this->db = $this->app['db']; |
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 | |
namespace Joeswann; | |
class NuorderConnector { | |
public $oauth_consumer_key; | |
public $oauth_consumer_secret; | |
public $endpoint; | |
public $oauth_verifier; | |
public $oauth_token; |
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
<form class="newsletter" action="https://example.us2.list-manage.com/subscribe/post-json?u=xxxxxxx&id=xxxxxxxx&c=?" method="get" > | |
<div class="close"></div> | |
<div class="success"> | |
Thankyou for signing up! | |
</div> | |
<div class="error"> | |
Please check your email address is correct. | |
</div> | |
<input name="NAME" type="text" placeholder="Full Name" /> | |
<input name="EMAIL" type="text" placeholder="Email Address" /> |
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
<form class="form-newsletter" action="http://xxxx.createsend.com/t/d/s/xxxx/" method="post" > | |
<h3>Newsletter</h3> | |
<div class="success"> | |
Thankyou for signing up! | |
</div> | |
<div class="error"> | |
Please check your email address is correct. | |
</div> | |
<input name="cm-xxxx-xxxx" type="email" placeholder="Email Address" required /> | |
<button type="submit" value="Sign Up" name="submit">Sign Up</button> |
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
convert -dispose none -delay 1.5 *.jpg -coalesce a.gif |
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
rake db:drop;rake db:create; rake db:migrate; rake db:seed; | |
bundle exec rake assets:precompile RAILS_ENV=production |
NewerOlder