Skip to content

Instantly share code, notes, and snippets.

View fayimora's full-sized avatar
🕺

Fayi FB fayimora

🕺
  • London, England
View GitHub Profile
<li>
{{!-- TODO: Clicking the dropdow shouldn't load a route :( --}}
{{#link-to 'users'}}
<i class="fa fa-shopping-cart"></i>
<span class="nav-label">List Users</span>
<span class="fa arrow"></span>
{{/link-to}}
<ul class="nav nav-second-level collapse">
<li>{{link-to 'Create User' 'users.new'}}</li>
<li>{{link-to 'Something else' 'users.smtelse'}}</li>
this.get('/merchants', function(db, request){
return db.merchants;
});
this.get('/merchants/:merchant_id', function(db, request) {
const id = request.params.merchant_id;
Ember.Logger.info(db.merchants);
return db.merchants.find(id);
});
@fayimora
fayimora / gist:1684e834e853c95a1b7b
Created February 21, 2016 00:15 — forked from neciu/gist:6bfeab3e3ae38638d8fb
Added hax enabling auto filing from existing models/properties.

Integrating TinyMCE in an ember-cli app

TinyMCE is a javascript WYSIWYG editor that is highly configurable and has a ton of features and plugins. It integrates with jQuery and, with a bit of work, it can be integrated in your ember-cli app.

Step 1: Install TinyMCE:

bower install --save tinymce

Step 2: Import the required files into your app via broccoli. In order to do that you will need a plugin called broccoli-static-compiler:

@fayimora
fayimora / android_lexer.rb
Created February 18, 2016 10:54 — forked from maxlinc/android_lexer.rb
Workaround for java vs android in slate
require 'rouge'
module Rouge
module Lexers
class Android < Rouge::Lexers::Java
tag 'android'
end
end
end
[error] 328 errors were encountered during merge
java.lang.RuntimeException: deduplicate: different file contents found in the following:
/Users/fayimora/.ivy2/cache/com.google.inject/guice/jars/guice-4.0.jar:com/google/inject/AbstractModule.class
/Users/fayimora/.ivy2/cache/com.google.inject/guice/jars/guice-4.0-no_aop.jar:com/google/inject/AbstractModule.class
deduplicate: different file contents found in the following:
/Users/fayimora/.ivy2/cache/com.google.inject/guice/jars/guice-4.0.jar:com/google/inject/Binder.class
/Users/fayimora/.ivy2/cache/com.google.inject/guice/jars/guice-4.0-no_aop.jar:com/google/inject/Binder.class
deduplicate: different file contents found in the following:
/Users/fayimora/.ivy2/cache/com.google.inject/guice/jars/guice-4.0.jar:com/google/inject/Binding.class
/Users/fayimora/.ivy2/cache/com.google.inject/guice/jars/guice-4.0-no_aop.jar:com/google/inject/Binding.class
~/C/B/brutehack-backend ❯❯❯ java -jar -Dconfig.file=src/main/resources/conf/development.conf target/scala-2.11/brutehack.jar
Dec 17, 2015 4:11:39 PM com.twitter.finagle.http.HttpMuxer$$anonfun$4 apply
INFO: HttpMuxer[/admin/metrics.json] = com.twitter.finagle.stats.MetricsExporter(<function1>)
Dec 17, 2015 4:11:39 PM com.twitter.finagle.http.HttpMuxer$$anonfun$4 apply
INFO: HttpMuxer[/admin/per_host_metrics.json] = com.twitter.finagle.stats.HostMetricsExporter(<function1>)
16:11:39.522 [main] INFO com.brutehack.ApplicationServerMain$ - Process started
I 1217 16:11:39.590 THREAD1: /admin => com.twitter.server.handler.SummaryHandler
I 1217 16:11:39.591 THREAD1: /admin/server_info => com.twitter.finagle.Filter$$anon$2
I 1217 16:11:39.591 THREAD1: /admin/contention => com.twitter.finagle.Filter$$anon$2
I 1217 16:11:39.591 THREAD1: /admin/lint => com.twitter.server.handler.LintHandler
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
listen [::]:80 default ipv6only=on;
# server_name ci.yourcompany.com;
location / {
# Jenkins will be launched as a daemon up on start. See /etc/init.d/jenkins for more details.
# The 'jenkins' user is created to run this service.
# Log file will be placed in /var/log/jenkins/jenkins.log. Check this file if you are troubleshooting Jenkins.
# /etc/default/jenkins will capture configuration parameters for the launch like e.g JENKINS_HOME
# By default, Jenkins listen on port 8080. Access this port with your browser to start configuration.
# sh -c "`curl -fsSL https://gist.githubusercontent.com/fayimora/881c7b4e97dea9ebbf11/raw/3adb1958ae88b61d5619c7cc03fa3c3764f7b3e5/install_jenkins.sh`"
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
/* ---- reset ---- */ body{ margin:0; font:normal 75% Arial, Helvetica, sans-serif; } canvas{ display: block; vertical-align: bottom; } /* ---- particles.js container ---- */ #particles-js{ position:absolute; width: 100%; height: 100%; background-color: #c71825; background-image: url(""); background-repeat: no-repeat; background-size: cover; background-position: 50% 50%; } /* ---- stats.js ---- */ .count-particles{ background: #000022; position: absolute; top: 48px; left: 0; width: 80px; color: #13E8E9; font-size: .8em; text-align: left; text-indent: 4px; line-height: 14px; padding-bottom: 2px; font-family: Helvetica, Arial, sans-serif; font-weight: bold; } .js-count-particles{ font-size: 1.1em; } #stats, .count-particles{ -webkit-user-select: none; margin-top: 5px; margin-left: 5px; } #stats{ border-radius: 3px 3px 0 0; overflow: hidden; } .count-particles{ border-radius: 0 0 3px 3px; }
</style>
</hea
find . -type d -empty -exec touch {}/.gitkeep \;