Skip to content

Instantly share code, notes, and snippets.

View mukkoo's full-sized avatar

Filippo Gangi Dino mukkoo

  • TheFork
  • Turin, Italy
View GitHub Profile
@mukkoo
mukkoo / balance.js
Last active February 24, 2023 14:34
import _ from "lodash";
import fs from "fs";
const compareOccurrences = (occurrences) => {
let differences = 0;
for (let key of Object.keys(occurrences)) {
if (occurrences[key] !== 0) differences++;
if (differences > 1) return false;
}
if (differences === 1) return true;
# [user]
# name = Nome Cognome
# email = nome.cognome@email.com
[alias]
# shortcuts
ci = commit
co = checkout
di = diff
dc = diff --cached
HTTParty.get "http://localhost:3000/teams.json", :headers=>{"Authorization"=>"Token token=\"a8d8ce14d2402a2e1912c25f39df770b\""}
ActiveAdmin.register Post do
index do
column :title
column :published_at
default_actions
end
form do |f|
f.inputs "Dettagli" do
f.input :title
@mukkoo
mukkoo / media-query.sass
Created February 28, 2014 11:55
Sass media queries
$mobile-size: 320px
$tablet-size: 768px
$netbook-size: 1030px
$desktop-size: 1600px
$mobile: "all and (max-width: #{$mobile-size})"
$tablet: "all and (min-width: #{($mobile-size + 1)}) and (max-width: #{$tablet-size})"
$netbook: "all and (min-width: #{($tablet-size + 1)}) and (max-width: #{$netbook-size})"
$desktop: "all and (min-width: #{$netbook-size + 1}) and (max-width: #{$desktop-size})"
$big-desktop: "all and (min-width: #{$desktop-size + 1})"
@mukkoo
mukkoo / zig-zag.sass
Last active August 29, 2015 13:56
pure css zig zag
@mixin zig-zag($width: 10px, $color: black, $position: bottom, $shadow: false)
$color_gradients: null
$shadow_gradients: null
$darken_color: darken($color, 50%)
$color_gradient1: linear-gradient(45deg, $color 25%, transparent 25%)
$color_gradient2: linear-gradient(45deg, transparent 75%, $color 75%)
$shadow_gradient1: linear-gradient(45deg, $darken_color 5%, transparent 35%)
$shadow_gradient2: linear-gradient(45deg, transparent 65%, $darken_color 95%)
position: relative
&:before