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
Detect Safari (if( $.browser.safari)), | |
Detect IE6 and over (if ($.browser.msie && $.browser.version > 6 )), | |
Detect IE6 and below (if ($.browser.msie && $.browser.version <= 6 )), | |
Detect FireFox 2 and above (if ($.browser.mozilla && $.browser.version >= '1.8' )) |
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 | |
rm u2bear.nw | |
pushd ../u2bear | |
zip -r ../u2bearbuilder/u2bear * -x docs/* images/* videos/* songs/* | |
popd | |
mv u2bear.zip u2bear.nw | |
cat nw.exe u2bear.nw>u2bear.exe | |
rm ship/u2bear.exe | |
mv u2bear.exe ship/u2bear.exe | |
rm ship/songs/* ship/videos/* ship/images/* ship/u2bear.zip |
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
app.post('/login', function(req, res) { | |
console.log(res); | |
passport.authenticate('local', function(err, user, params) { | |
if (req.xhr) { | |
//thanks @jkevinburton | |
if (err) { return res.json({ error: err.message }); } | |
// e.g. in auth.js: | |
// if (!user.emailVerified) { return done(null, false, { message: 'Email is not verified. Please check your email for the link.' }); } | |
if (!user && params) { return res.json({error : params.error}); } |
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() { | |
'use strict'; | |
if (typeof sigma === 'undefined') | |
throw 'sigma is not declared'; | |
sigma.utils.pkg('sigma.plugins'); | |
var startPosition; | |
var WIDTH; |
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
{ | |
"Red":{ | |
"50":"#ffebee", | |
"100":"#ffcdd2", | |
"200":"#ef9a9a", | |
"300":"#e57373", | |
"400":"#ef5350", | |
"500":"#f44336", | |
"600":"#e53935", | |
"700":"#d32f2f", |
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 fs = require('fs'); | |
var pathModule = require('path'); | |
var Q = require('q'); | |
var replace = require('replace'); | |
function init(path, refactorFiles, destPath) { | |
// console.log(path); | |
findPattern(path, /language\.js$/).then(function (filesPaths) { | |
refactorFiles(filesPaths, destPath); | |
}).catch(console.log); |
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
import Rx from 'rxjs/Rx' | |
function emitByBuffer(subscriber, interval, buffer, lastUpdateTime){ | |
// debugger | |
return new Promise(function (resolve) { | |
if (((Date.now() - lastUpdateTime) > interval) && buffer.length>0) { | |
subscriber.next(buffer) | |
return resolve(true) | |
} else if(buffer.length>0) { | |
setTimeout(()=>{ |
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
import React, { Component } from 'react' | |
export default class ResponsiveText extends Component { | |
static defaultProps = { | |
scale: 1, | |
} | |
constructor(props) { | |
super(props) | |
this.state = { | |
style: 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
import React,{Component} from 'react' | |
import PropTypes from 'prop-types' | |
export default class BodyClassName extends Component { | |
static propTypes = { | |
className: PropTypes.string, | |
} | |
static defaultProps = { | |
className: '', |
OlderNewer