Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Luca Barone cloud-walker

🎯
Focusing
View GitHub Profile
@cloud-walker
cloud-walker / common.ts
Last active February 28, 2021 06:47
TypeScript utils
View common.ts
export type Nully = null | undefined
export type Falsy = false | 0 | '' | Nully
@cloud-walker
cloud-walker / useScript.js
Created July 30, 2019 10:23
useStripe React hook
View useScript.js
import React from 'react'
let cache = []
const isCached = src => cache.includes(src)
export const useScript = src => {
const [state, setState] = React.useState({
isLoaded: isCached(src),
hasError: false,
})
@cloud-walker
cloud-walker / aliases.md
Last active July 24, 2022 20:32
Awesome GIT
View aliases.md

Base configuration

Global for me: add them on ~/.gitconfig

[alias]
  s = status -s
  unstage = reset HEAD --
  last = log -l HEAD
  lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
 branch-name = rev-parse --abbrev-ref HEAD
@cloud-walker
cloud-walker / base
Created June 10, 2016 14:05
Ligatures examples
View base
.= .- := =:=
== != === !== =/=
<<- <-- <- <-> -> --> ->>
<=< <<= <== <=> => ==> =>> >=>
>>= >>- >- -< -<< =<<
<~~ <~ ~~~ ~~ ~> ~~>
<<< << <= <> >= >> >>>
<| <|> |>
@cloud-walker
cloud-walker / css-patterns.md
Created June 8, 2016 16:52
CSS common patterns
View css-patterns.md
  • container
  • text ellipsis
  • clearfix
  • label
  • breadcrumb
  • tag
  • link
  • button
  • sequence
@cloud-walker
cloud-walker / base
Last active May 6, 2016 06:59
editorconfig templates
View base
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
View claimFighissimo.phtml
<p class="isArrivedAndIsBeautifull" style="font-size: 2em;color: #333;text-align: center;">&Egrave; arrivata... ed &egrave; bellissima!</p>