Skip to content

Instantly share code, notes, and snippets.

Alex Muraro akmur

Block or report user

Report or block akmur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
akmur /
Created Jun 7, 2019 — forked from apisandipas/
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's




View index.stores.js
// importing basic redux packages
import { createStore, applyMiddleware, compose } from 'redux'
// importing our combined reducers
import combineReducers from '../reducers/index.reducers'
// importing our middleware
import { middlewareActions } from '../middleware/index.middleware'
// this is needed to be able to do ajax requests
import thunk from 'redux-thunk'
// the following line is used for the redux devtools chrome extension
const storeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
View user.reducers.js
// our initial state
const initialState = {
data: {},
isLoaded: false
const userReducer = (state = initialState, action) => {
if (action.type === 'USER_LOADED') {
return {
...state, // this copies the old state
View index.middleware.js
import axios from 'axios'
export function middlewareActions({ dispatch }) {
return next => action => {
if (action.type === 'USER_LOADED') {
payload: true
View index.actions.js
import axios from 'axios'
export function loadUser() {
// this will be used to trigger the reducer
return {
type: 'LOAD_USER'
export function loadNews() {
View User.js
import React, { Component } from 'react'
import { loadUser } from './redux/actions/index.actions'
// this is what matters for redux
import { connect } from 'react-redux'
class User extends Component {
componentDidMount() {
if (!this.props.user.isLoaded) {
View index.js
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() {
View gist:caf80ae7f1b8643cb160c49dfc47defa
var first = '';
var second = '';
var third = '';
var fourth = '';
var fifth = '';
module.exports = { first, second, third, fourth, fifth };
akmur / .eslintrc
Created Aug 21, 2017 — 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).
View .eslintrc
"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 / Tablet Resolutions Regex
Created Aug 8, 2017
Tablet Resolutions Regex
View Tablet Resolutions Regex
the first three groups of numbers are for 768 numbers, assuming you are not interested in mobiles for example
You can’t perform that action at this time.