Skip to content

Instantly share code, notes, and snippets.

View arleyhr's full-sized avatar
💭
:v

Arley HR arleyhr

💭
:v
View GitHub Profile
const theme = {
space: [0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96],
fonts: {
default: '"SF Pro Text", Poppins, "Avenir Next", Helvetica, sans-serif',
alt: 'Baskerville, serif',
},
fontSizes: {
uber: '111px',
hero: '77px',
h1: '45px',
UPDATE `>>tablenam<<` SET slug = lower(>>BASE_TEXT<<),
slug = replace(slug, '.', ''),
slug = replace(slug, '\'', '-'),
slug = replace(slug, '/', '-'),
slug = replace(slug,'š','s'),
slug = replace(slug,'Ð','Dj'),
slug = replace(slug,'ž','z'),
slug = replace(slug,'Þ','B'),
slug = replace(slug,'ß','Ss'),
slug = replace(slug,'à','a'),
@arleyhr
arleyhr / post.schema.js
Last active September 9, 2021 00:04
GraphQL modularize
const typeDefinitions = `
type User {
id: ID!
author: User!
summary: String!
content: String!
image: String!
tags: [Tag!]!
}
@arleyhr
arleyhr / 1 Gist conventions
Last active February 21, 2017 16:52 — forked from PavloBezpalov/1 Gist conventions
Deploy Rails 5.0.* to VPS(Ubuntu 14.04.4 LTS). Nginx, Puma, Capistrano3, PostgreSQL, RVM.
<<APP>> change this variables
@arleyhr
arleyhr / setup.md
Last active July 7, 2016 16:20 — forked from oelmekki/doc.md
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@arleyhr
arleyhr / angular-cancelable-http.js
Created January 8, 2016 20:19
Angular cancelable http requests
(function(){
angular
.module('cancelableHttp')
.config(config)
.service('CancelableHttpService', httpService)
@arleyhr
arleyhr / SimplePasswordEncript.js
Created January 8, 2016 14:33
Simple Password Encript
var crypto = require('crypto');
var SaltLength = 9;
var set = '/.EyDNbL7R^eJvwm';
function createHash (password, cb){
var salt = generateSalt(SaltLength),
@arleyhr
arleyhr / simpeuuidgenerator.js
Last active January 8, 2016 14:31
Simple uuid generator
var crypto = require('crypto')
module.exports = function(){
return crypto.randomBytes(5).toString('hex') +'-'+crypto.randomBytes(5).toString('hex') + '-'+(new Date().getTime());
}