Skip to content

Instantly share code, notes, and snippets.

View code0100fun's full-sized avatar
🏠
Working from home

Chase McCarthy code0100fun

🏠
Working from home
View GitHub Profile
@code0100fun
code0100fun / controllers.application.js
Last active May 22, 2019 21:00 — forked from cbroeren/controllers.application.js
ember-data 3.6 infinit belongsTo fetch
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
# Make sure you grab the latest version
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0-rc1/protoc-3.8.0-rc-1-linux-x86_64.zip
# Unzip
unzip protoc-3.8.0-rc-1-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@code0100fun
code0100fun / export_to_unit8_t.js
Last active January 13, 2019 22:24 — forked from juliandescottes/export_to_unit8_t.js
Piskel Feature request: Add unit8_t version to "Export as C file" for single color images #606
var export_to_unit8_t = function () {
var HTML_NEW_LINE = '
';
var width = pskl.app.piskelController.getWidth();
var height = pskl.app.piskelController.getHeight();
var frameCount = pskl.app.piskelController.getFrameCount();
var str = '';
str += '#include <stdint.h>' + HTML_NEW_LINE;
str += '#define SPRITE_SHEET_FRAME_COUNT ' + frameCount + HTML_NEW_LINE;
@code0100fun
code0100fun / i2c_restart_main.c
Created July 26, 2018 16:56 — forked from mws-rmain/i2c_restart_main.c
ESP32 I2C example using ESP32 as I2C master, and a I2C device with a registered interface (requires I2C restart to read register value)
/* i2c_restart - Example
For other examples please check:
https://github.com/espressif/esp-idf/tree/master/examples
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
import Ember from 'ember';
export default Ember.Controller.extend({
userService: Ember.inject.service('user'),
userController: Ember.inject.controller('user'),
actions: {
incrementController() {
this.incrementProperty('userController.counter', 1);
},
decrementController() {
@code0100fun
code0100fun / components.my-component.js
Last active September 20, 2017 19:39 — forked from Gaurav0/components.my-component.js
ember-native-dom-helpers
import Ember from 'ember';
export default Ember.Component.extend({
showPopup: false,
actions: {
blurA() {
this.set('showPopup', false);
},
focusA() {
this.set('showPopup', true);
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Weekend'
});