Skip to content

Instantly share code, notes, and snippets.

View jfrux's full-sized avatar
👨‍💻
Full send daily.

jfrux jfrux

👨‍💻
Full send daily.
View GitHub Profile
@jfrux
jfrux / order-template.liquid
Created August 17, 2023 11:58 — forked from enamhasan/order-template.liquid
Shopify Order Printer Template with product image, variations and line item properties
<p style="float: right; text-align: right; margin: 0;">
{{ "now" | date: "%m/%d/%y" }}<br />
Invoice for {{ order_name }}
</p>
<div style="float: left; margin: 0 0 1.5em 0;" >
<strong style="font-size: 2em;">{{ shop_name }}</strong><br /><br />
{{ shop.address }}<br/>
{{ shop.city }} {{ shop.province_code }} {{ shop.zip | upcase }}<br/>
{{ shop.country }}
sub init()
' ...
m.itemsListNode = m.top.findNode("tickerItems")
' ...
end sub
' ...
sub onContentChange()
if m.top.itemsList <> invalid
m.itemsListNode.insertChildren(m.top.itemsList)
@jfrux
jfrux / colins_wind_tunnel.ino
Created March 13, 2020 00:51
Colins Wind Tunnel Fan Code
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <Servo.h>
Servo throttle;
bool testMode = false;
int escPin = 10;
int buttonPin = 4;
int forwardPos = 102;
@jfrux
jfrux / gist:5c56b0c90cb7bb7efe6778ade0629d5a
Created December 12, 2018 16:21 — forked from Startouf/gist:91d3b5eab004f04dfbb0d068b311ff3e
Mongoid adapter for jsonapi_suite
# lib/jsonapi/adapters/transactionless_mongoid_adapter.rb
module Jsonapi
module Adapters
# Mongoid transactionless adapter
# See https://github.com/jsonapi-suite/jsonapi_compliable/blob/master/lib/jsonapi_compliable/adapters/abstract.rb
#
# @author [Cyril]
#
class TransactionlessMongoidAdapter < JsonapiCompliable::Adapters::Abstract
def sideloading_module
SELECT * FROM core_recipeitem RI1
LEFT JOIN core_recipeitem RI2 ON RI1.item_id = RI2.item_id
@jfrux
jfrux / ui.c
Last active July 15, 2018 00:21
openpilot ui.c with tri-state switches and stats
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <assert.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <cutils/properties.h>
@jfrux
jfrux / Installing Chocolatey on Windows
Created June 19, 2018 15:55
Corresponding Code for Comma EON: Connecting via SSH on Medium
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
@jfrux
jfrux / Failed Attempt 1.ino
Last active August 24, 2023 19:57
Traxxas RC Car Arduino Experiements.
#include "Servo.h"
Servo myServo1;
Servo myServo2;
int angle=90;
int thrust=90;
int sensorValue=8;
char incoming = "";
void setup() {
@jfrux
jfrux / guide.md
Last active October 12, 2017 12:47
Getting Friendly with Ember - Part 2

Getting Friendly with Ember — Part 2

Learning the Basics

This document assumes you already have a working version of ember-cli installed. If you need help installing Node.js or Ember I can recommend a decent guide or help you myself.

Creating a New Ember App

Open up a fresh Terminal (MacOS & Linux) / PowerShell (Windows) window.

At the prompt we will change into our Projects directory (wherever you keep your code projects).

@jfrux
jfrux / 0_reuse_code.js
Created August 10, 2017 12:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console