Skip to content

Instantly share code, notes, and snippets.

View xcambar's full-sized avatar

Xavier Cambar xcambar

View GitHub Profile
import Component from '@ember/component'
export default Component.extend({
tagName: '',
aIsChecked: false,
bIsChecked: false,
someOtherMethod() {
console.log('someOtherMethod() this = ', this)
},
someMethod() {
import Ember from 'ember';
export default Ember.Controller.extend({
service: Ember.inject.service('thing-service'),
actions: {
changeColor() {
const color = this.get('service.color');
const colors = ['red', 'blue'];
@xcambar
xcambar / nginx-cors.conf
Last active November 1, 2021 09:27 — forked from algal/nginx-cors.conf
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
//
// This script shows how to add custom traits to a user
//
var hull = require('hull');
hull.conf({
appId: 'abcd',
orgUrl: 'https://demo.hullapp.io',
appSecret: '1234'
#install required packages
apt-get update
apt-get upgrade -y
apt-get install -y git curl build-essential libssl-dev libcurl4-openssl-dev nodejs
#install sqlite3 (optional)
apt-get install libsqlite3-dev sqlite3
#install postgres (optional)
sudo apt-get install postlibpq-dev
@xcambar
xcambar / HTML5 Skeleton template.html
Last active December 28, 2015 21:39 — forked from rtuin/HTML5 Skeleton template.html
HTML minimal template with Hull comments
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!-- Insert you hull.io dashboard snippet here -->
</head>
<body></body>
</html>