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
<button data-payhere-embed="https://payhere.co/altlabs/membership/pro-plan">Subscribe now</button> | |
<script src="https://payhere.co/embed/embed.js"></script> |
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
<%= page_title("Account") %> | |
<%= render 'my_account/shared/header', current_section: "rewards" %> | |
<div class="container"> | |
<div class="tab-content"> | |
<div class="grid"> | |
<div class="col-2-3"> | |
<h3 class="heading">Bonus Points <span>2/8 bonus points earned</span></h3> | |
<p>Get even greater value from your rewards points by redeeming them against these special offers below. These offers are a one time only use and only unlock as and when you reach the Rewards Level required to do so.</p> |
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
server { | |
listen 80; | |
server_name ~^(?P<sitename>.+)\.dev\.com$ | |
access_log /var/www/vhosts/$sitename/logs/nginx.access.log; | |
error_log /var/www/vhosts/$sitename/logs/nginx.error.log; | |
root /var/www/vhosts/$sitename/public; | |
autoindex on; | |
index index.php; | |
include global/static-asset-caching.conf; |
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
git log HEAD...origin/master --pretty=oneline | grep pull |
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
# The examples are in Ruby using RestClient (an http library) | |
# Already have a cursor for this user retreived the last time I called /2/files/list_folder/continue | |
# 1AAFFUB2KR3h0S0317__4aWVmvEQwDmIR2fdxsGL4cZGqiZjavby0HkZT70COXZm6XlswiDTQXSM7ir1qZX9uGoKGI9FbI7dSiquLv9-shzV8qOb126UToXHiKfe_oDFRzCg | |
resp = RestClient.post( | |
"https://api.dropboxapi.com/2/files/list_folder/continue", | |
{ | |
cursor: "1AAFFUB2KR3h0S0317__4aWVmvEQwDmIR2fdxsGL4cZGqiZjavby0HkZT70COXZm6XlswiDTQXSM7ir1qZX9uGoKGI9FbI7dSiquLv9-shzV8qOb126UToXHiKfe_oDFRzCg" |
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
{ | |
"entries": [{ | |
".tag": "folder", | |
"name": "flashed", | |
"path_lower": "/flashed", | |
"id": "id:aJSxKm7T6cAAAAAAAAAAAg" | |
}, { | |
".tag": "file", | |
"name": "tumblr_nrjpzx4aAl1t7ikjqo1_1280.jpg", | |
"path_lower": "/flashed/tumblr_nrjpzx4aal1t7ikjqo1_1280.jpg", |
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
def my_sample_method | |
# inputs | |
people = [] | |
# work | |
people = Person.all | |
raise CustomError, "No people found." unless people.size > 0 | |
# outputs | |
return people.to_json |
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
require_relative "../../../acceptance_helper.rb" | |
# require File.expand_path("../../../../acceptance_helper", __FILE__) | |
describe "api/v1/colours" do | |
before do | |
@data = { | |
url: "http://illustrationage.files.wordpress.com/2013/08/breaking-bad-walter-white-darth-heisenberg-pj-mcquade-9.jpg", | |
filename: "breaking-bad-walter-white-darth-heisenberg-pj-mcquade-9.jpg" | |
} | |
end |
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
# Remove git branches from stuff | |
function rmb { | |
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
if [ "$current_branch" != "master" ]; then | |
echo "WARNING: You are on branch $current_branch, NOT master." | |
fi | |
echo "Fetching merged branches..." | |
git remote prune origin | |
remote_branches=$(git branch -r --merged | grep -v '/master$' | grep -v "/$current_branch$") | |
local_branches=$(git branch --merged | grep -v 'master$' | grep -v "$current_branch$") |
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
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
# For all responses in this controller, return the CORS access control headers. | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, OPTIONS' | |
headers['Access-Control-Max-Age'] = "1728000" | |
end |