Skip to content

Instantly share code, notes, and snippets.

Joseph Le Brech jlebrech

Block or report user

Report or block jlebrech

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
@jlebrech
jlebrech / webpack.config.js
Created Jun 7, 2018
webpack 3.1, AngularJS 1.x config
View webpack.config.js
var path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
config = {
entry: {
app: './app/scripts/main.js',
login: './app/scripts/login.js',
vendors: './app/scripts/vendors.js'
View ng-options.html
<select
ng-model="selected.service_plan"
ng-options="item.id as ('£' + item.label) for item in billing_info.service_plans">
</select>
what's wrong with looping through stuff rather than come up with some expression language? speed?
View a.stache
<ui-panel>
<div class="panel-heading">
Title here
</div>
<div class="panel-body" style="height:200px">
....
</div>
<div class="panel-footer clearfix">
Footer
</div>
View add-getters-to-results.js
results = []
for (i in res.guests){
model = {
name: res.guests[i].name
};
Object.defineProperties(model, {
'reversename': {
View designer.html
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#core_scaffold {
position: absolute;
top: 0px;
right: 0px;
@jlebrech
jlebrech / components.xml
Created Jun 3, 2014
Just a mashup of a site layout using simple semantics
View components.xml
<main>
<nav>
<link to="">somewhere</link>
link to="">somewhere</link>
link to="">somewhere</link>
</nav>
<section type="blog">
<post author="" date="">
Lorem ipsum
</post>
View edit.html.erb
<% @my_form.render do |f| # custom form %>
<div class="firstname"><%= f.firstname # maybe options are possible here %></div>
<div class="text"><%= f.text %></div>
<% end %>
<%= @my_form.render # no customization %>
View my_form.rb
require 'ostruct'
class MyForm < OpenStruct
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
validates :name, :presence => true
def initialize(*args)
super
View gopaths
➜ go-gtk git:(master) make
cd pango && go build && go install github.com/mattn/go-gtk/pango
package .
imports runtime: cannot find package "runtime" in any of:
/usr/local/go/bin/src/pkg/runtime (from $GOROOT)
/Users/jlebrech/gocode/src/runtime (from $GOPATH)
package .
imports runtime/cgo: cannot find package "runtime/cgo" in any of:
/usr/local/go/bin/src/pkg/runtime/cgo (from $GOROOT)
/Users/jlebrech/gocode/src/runtime/cgo (from $GOPATH)
View error.txt
~ go get github.com/mattn/go-gtk/gtk
package github.com/mattn/go-gtk/gtk
imports fmt: unrecognized import path "fmt"
package github.com/mattn/go-gtk/gtk
imports runtime: unrecognized import path "runtime"
package github.com/mattn/go-gtk/gtk
imports runtime/cgo: unrecognized import path "runtime/cgo"
package github.com/mattn/go-gtk/gtk
imports unsafe: unrecognized import path "unsafe"
package github.com/mattn/go-gtk/gtk
You can’t perform that action at this time.