This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
FILES=$(find . -type f -name '*.flac') | |
for f in $FILES | |
do | |
ffmpeg -i $f -c:a aac "${f%.flac}.aac" < /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract MyToken { | |
/* This creates an array with all balances */ | |
mapping (address => uint256) public balanceOf; | |
/* Initializes contract with initial supply tokens to the creator of the contract */ | |
function MyToken( | |
uint256 initialSupply | |
) { | |
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Kuzzle = require('kuzzle-sdk'); | |
var kuz = new Kuzzle('http://workshop.challenge.kuzzle.io:7512', {defaultIndex: 'klack'}); | |
kuz.dataCollectionFactory('messages').publishMessage({ | |
hello: "world" | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['require', 'marionette', 'App', 'collections/Gigs'], | |
function (require) { | |
'use strict'; | |
var App = require('App'), | |
Marionette = require('marionette'), | |
Gigs = require('collections/Gigs'); | |
var GigStore = Marionette.Controller.extend({ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['require', 'backbone.marionette', 'handlebars', | |
'constants/events', 'text!../templates/v_btn.html', | |
'css!../styles/buttons.css'], | |
function (require) { | |
'use strict'; | |
var Backbone = require('backbone'); | |
var Marionette = require('backbone.marionette'); | |
var Handlebars = require('handlebars'); | |
var Events = require('constants/events'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['require', 'backbone', 'collections/c_tags'], function(require) { | |
"use strict"; | |
var Backbone = require('backbone'); | |
var TagsCollection = require('collections/c_tags'); | |
return Backbone.Model.extend({ | |
tagsCollection: null, | |
url: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: { | |
options: { | |
paths: [ // Where to look for files to @import | |
"app/styles/" | |
] | |
}, | |
files: [ | |
// @see http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically | |
{ | |
expand: true, // Enable dynamic expansion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define({ | |
map:{ | |
'*': { 'nav': 'custom/header/nav.custom' } | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.extend( { | |
limiter: function(limit, elem) { | |
$(this).on("keyup focus", function() { | |
setCount(this, elem); | |
}); | |
function setCount(src, elem) { | |
var chars = src.value.length; | |
if (chars > limit) { | |
src.value = src.value.substr(0, limit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Matches a string over the other in a fuzzy word-by-word fashion. | |
* The needle matches the haystack if the haystack contains all the words | |
* of the needle in any order. | |
* | |
* @param String $haystack The string to search in. | |
* @param String $needle The string that has to be searched for in the | |
* haystack. | |
* @return Boolean true if the needle matches the haystack, false | |
* otherwise. |
NewerOlder