Skip to content

Instantly share code, notes, and snippets.

View akmur's full-sized avatar

Alessandro Muraro akmur

View GitHub Profile
@akmur
akmur / Resursive Callbak.js
Last active December 11, 2015 22:48
funzione che quando chiamata fa una animazione sul primo item, poi in sequenza come callback sui seguenti
function glowNext(jq){
jq.eq(0).animate({"color": "#FFC000"}, 75, function(){
(jq=jq.slice(1)).length && glowNext(jq);
});
};
glowNext($('span.tag'));
@akmur
akmur / Linux Commands.txt
Last active December 22, 2015 17:59 — forked from barek2k2/Most used linux command
Useful Linux Commands in collaboration with Abdul Barek
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
@akmur
akmur / package.json
Created March 5, 2016 22:46 — forked from addyosmani/package.json
npm run-scripts boilerplate
{
"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",
@akmur
akmur / stickyheader.js
Last active April 9, 2016 11:21
Sticky Header script
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();
};
@akmur
akmur / geolocation.js
Created March 14, 2017 16:50
Geolocation Module
/* 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(){
@akmur
akmur / Tablet Resolutions Regex
Created August 8, 2017 13:16
Tablet Resolutions Regex
^([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
@akmur
akmur / .eslintrc
Created August 21, 2017 10:52 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// 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
@akmur
akmur / swipe.js
Created March 2, 2017 13:52 — forked from wiesys/swipe.js
A simple swipe detection on vanilla js
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;
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 };
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() {