Skip to content

Instantly share code, notes, and snippets.

Raul Brito raulbrito

Block or report user

Report or block raulbrito

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raulbrito
raulbrito / get_latest_changes_from_shopify.sh
Created Jan 28, 2016
Update repository with latest changes from the Shopify side
View get_latest_changes_from_shopify.sh
git status # make sure you don't have any changes locally
theme download # get the latest version from the shopify servers
git add . # adds all the changed files to be commited
git commit -m "commit changes from server" # commits all changes made since last time
git push origin master # pushes the changes to the remote repository
@raulbrito
raulbrito / update_repo.sh
Created Jan 28, 2016
Add commit to repo with latest changes
View update_repo.sh
git status # allows to see the changes made
git add . # to add all the changed files. you can also add them one by one
git commit -m "description of changes made" # commits the changes locally
git push origin master # or any other remote repository and branch to you prefer
View download_theme_and_create_repo.sh
theme configure f3d64ec79d0d8339d745208bf382bd85 2526f780336b9284ee980d630c36bc2f thundercat.myshopify.com 84991510 # this create a configuration file (config.yml)
theme download # this downloads all the corresponding theme files to your computer
git init . # this creates a local git repository
git add . && git commit -m "first commit" # adds all the files to the local repository
View shopify-tracker.rb
require 'pusher-client'
require 'sqlite3'
require 'json'
db = SQLite3::Database.open "blackfriday.db"
#rows = db.execute <<-SQL
# create table orders (
# from_latitude int,
# from_longitude int,
@raulbrito
raulbrito / theme.liquid
Last active Aug 29, 2015
VAT rates for Shopify - multiple variants
View theme.liquid
<!-- make sure to apply the changes for the single variant approach
before making these changes for multi-variant.
Single variant approach is implemented here: https://gist.github.com/raulbrito/581678194f109efbe1d4
-->
var selectCallback = function(variant, selector) {
if (variant) {
if (variant.featured_image) {
var newImage = variant.featured_image;
@raulbrito
raulbrito / cart.liquid
Last active Aug 29, 2015
VAT rates for Shopify - single variant
View cart.liquid
<tbody>
{% for item in cart.items %}
<tr>
<td class="image">
<div class="product_image">
<a href="{{ item.url }}">
<img src="{{ item | img_url: 'small' }}" alt="{{ item.title | escape }}" />
</a>
</div>
</td>
View eclipse.ini
-nosplash
--launcher.defaultAction
openFile
-vm
C:/JDK7/jre/bin/server/jvm.dll #Windows
#/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java #OS X
-vmargs
-Xincgc
-Xss1m
-Duser.name=FirstName LastName
View gist:791330
$ sudo gem install rack
$ sudo gem install sinatra
$ sudo gem install shotgun
View SellOneItemTest.java
package ca.jbrains.pos.test;
import static org.junit.Assert.*;
import java.util.*;
import org.junit.*;
public class SellOneItemTest {
public static class Sale {
View CalculatorController.java
package calculator;
public class CalculatorController {
private final CalculatorModel model;
private Calculation calculation;
public CalculatorController(CalculatorModel model, Calculation calculation) {
this.model = model;
You can’t perform that action at this time.