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 glowNext(jq){ | |
jq.eq(0).animate({"color": "#FFC000"}, 75, function(){ | |
(jq=jq.slice(1)).length && glowNext(jq); | |
}); | |
}; | |
glowNext($('span.tag')); |
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
Copy directory to remote server from remote server | |
scp -r sourcedir/ user@dest.com:/dest/dir/ | |
Run a scheduled rake task(lets say update sphinx indexing on every 30 min periodically) on Lunux crontab: | |
# find where is your rake(which rake) | |
#m h dom mon dow user command | |
*/30 * * * * root /bin/bash -l -c 'searchd --stop -c /var/rails/project/current/config/production.sphinx.conf && cd /var/rails/project/current && RAILS_ENV=production /usr/local/bin/rake ts:rebuild && chmod -R 777 tmp/' | |
Create Symbolic link(Short cut) | |
ln -s /source/dir destination/dire/short_cut_name |
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
{ | |
"name": "my-app", | |
"version": "1.0.0", | |
"description": "My test app", | |
"main": "src/js/index.js", | |
"scripts": { | |
"jshint:dist": "jshint src/js/*.js'", | |
"jshint": "npm run jshint:dist", | |
"jscs": "jscs src/*.js", | |
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |
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 App = (function () { | |
// Sticky Header | |
var stickyHeader = function (navElement) { // needs the ID of the element | |
this.nav = document.getElementById(navElement); | |
this.siteBody = document.getElementsByTagName("body")[0]; | |
this.stuck = false; | |
this.stickPoint = this.getDistance(); | |
}; |
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
/* global document google */ | |
/** | |
* This file contains code for the maps found in the website. | |
* It takes care of converting an address to a location by using google's geocode code. | |
* | |
* @summary Map Loader | |
*/ | |
const mapLoader = (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
^([7-9][0-9][0-9]|[0-1][0-0][0-5][0-9])x([1-8][0-9][0-9]|[1-9][0-9][0-9][0-9])$ | |
the first three groups of numbers are for 768 numbers, assuming you are not interested in mobiles for example |
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
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
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 touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
var gesuredZone = document.getElementById('gesuredZone'); | |
gesuredZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.changedTouches[0].pageX; | |
touchstartY = event.changedTouches[0].pageY; |
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 first = 'https://google.com'; | |
var second = 'https://bing.com'; | |
var third = 'https://duckduckgo.com'; | |
var fourth = 'https://yandex.com'; | |
var fifth = 'https://qwant.com'; | |
module.exports = { first, second, third, fourth, fifth }; |
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 from 'react' | |
import ReactDOM from 'react-dom' | |
import './styles.css' | |
import User from './User' | |
import News from './News' | |
import Status from './Status' | |
import { Provider } from 'react-redux' | |
import store from './redux/stores/index.stores' | |
function App() { |