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 gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var handleErrors = require('../util/handleErrors'); | |
var source = require('vinyl-source-stream'); | |
var packageJson = require('../../package.json'); | |
var dependencies = Object.keys(packageJson && packageJson.dependencies || {}); | |
gulp.task('libs', 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
# Maintainer: Eric Engestrom <aur [at] engestrom [dot] ch> | |
# Contributor: Attila Bukor <r1pp3rj4ck [at] w4it [dot] eu> | |
pkgname=popcorntime-git | |
pkgver=r3463.416dbc2 | |
pkgrel=1 | |
pkgdesc="Stream movies from torrents. Skip the downloads. Launch, click, watch." | |
arch=('i686' 'x86_64') | |
url="http://popcorntime.io" | |
license=('GPL3') |
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
--- a/qtdeclarative/src/qml/qml/v8/qv8engine.cpp 2014-10-25 17:36:02.410146635 +0300 | |
+++ b/qtdeclarative/src/qml/qml/v8/qv8engine.cpp 2014-10-25 17:36:55.327536841 +0300 | |
@@ -478,12 +478,6 @@ | |
void QV8Engine::freezeObject(const QV4::ValueRef value) | |
{ | |
- QV4::Scope scope(m_v4Engine); | |
- QV4::ScopedFunctionObject f(scope, m_freezeObject.value()); | |
- QV4::ScopedCallData callData(scope, 1); | |
- callData->args[0] = value; |
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 fibonacci = (n) => (n > 1) ? fibonacci(n - 1) + fibonacci(n - 2) : | |
(n == 1) ? 1 : | |
(n == 0) ? 0 : | |
undefined |
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/sh | |
maxbrightness=`cat /sys/class/backlight/intel_backlight/max_brightness` | |
brightness=/sys/class/backlight/intel_backlight/brightness | |
sudo tee $brightness <<< $maxbrightness |
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
# Common patterns | |
snippet ':f "object method string" | |
'${1:${2:#thing}:${3:click}}': function(element) { | |
${VISUAL}$0 | |
}${10:,} | |
endsnippet | |
snippet :f "Object Method" | |
${1:method_name}: function(${3:attribute}) { | |
${VISUAL}$0 |
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
(def JSON (s/either s/Str | |
s/Num | |
s/Bool | |
[(s/recursive #'JSON)] | |
{s/Keyword (s/recursive #'JSON)})) |
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 generateUUID(){ | |
var d = new Date().getTime(), | |
pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | |
return pattern.replace(/[xy]/g, function(c) { | |
var r = (d + Math.random()*16)%16 | 0 | |
d = Math.floor(d/16) | |
return (c=='x' ? r : (r&0x3|0x8)).toString(16) | |
}) | |
} |
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
(defn- generate-uuid [] | |
(let [pattern "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" | |
time-api (or js/performance js/Date) | |
now (atom (.now time-api))] | |
(replace pattern #"[xy]" (fn [char] | |
(let [r (-> (rand) | |
(* 16) | |
(+ @now) | |
(rem 16) | |
(int)) |
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
(defprotocol ITest (test [x] [x y])) | |
(defrecord Fails [] | |
ITest | |
(test | |
([x] (str x)) | |
([x y] (str x y)))) | |
(defrecord Works [] | |
ITest |
OlderNewer