Skip to content

Instantly share code, notes, and snippets.

View scerelli's full-sized avatar
🪡
Bored

Stefano Cerelli scerelli

🪡
Bored
View GitHub Profile

Keybase proof

I hereby claim:

  • I am scerelli on github.
  • I am v00d0 (https://keybase.io/v00d0) on keybase.
  • I have a public key ASDn_503gx0AdKlJaDaE8he_bf1PHPIHkWpRsaMhUh1qGAo

To claim this, I am signing this object:

@scerelli
scerelli / divide-and-conquer-ex.java
Created March 29, 2019 13:06
Just an implementation in pseudo of the Divide-and-conquer algorithm
int elementToFind // questo e' il numero che vuoi cercare nell'array, nel tuo caso lo mette l'utente
array data = [...some data] // qua ci metti il tuo array con tutta la roba
int mid;
int low = 0;
int high = data.length - 1;
while (high - low > 1) {
mid = Math.floor((low + high) / 2);
if (data[mid] < ) {
low = mid;
@scerelli
scerelli / transactions.jsonld
Last active February 28, 2019 17:18
transactions.json
[{
"id": 0,
"description": "laborum aliqua sunt",
"amount": 438,
"date": "2018-11-26T08:56:36",
"currency": "£",
"category": "shopping"
}, {
"id": 1,
"description": "pariatur enim occaecat",
@scerelli
scerelli / introrx.md
Created May 19, 2017 12:59 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@scerelli
scerelli / Preferences.sublime-settings
Last active May 16, 2016 09:21
Sublime preferences for seti theme
{
"Seti_SB_bright": true,
"Seti_blue_label": true,
"Seti_sb_tree_miny": true,
"Seti_show_group_arrows": true,
"Seti_sidebar_font_Fira": true,
"Seti_tabs_small": true,
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_bottom": 3,
@scerelli
scerelli / README
Last active October 25, 2015 20:01
Basic gulp file. There is server, sass compile, live reload on file change and susy for grid.
Folder structure might be:
app/views/view.html
app/index.html
app/assets/styles/application.sass
@scerelli
scerelli / grid-system-susy.sass
Last active September 17, 2015 23:03
Grid system (gutter free) based on bootstrap grid naming.
// @author: Stefano Cerelli
// @grid system like Bootstrap
+layout(12)
$total-columns: 12
$gutter: 0
$screen-sm: 768px
$screen-md: 992px
$screen-lg: 1200px
$spacer-base: 8
@scerelli
scerelli / _helpers.sass
Last active September 17, 2015 12:28
A set of sass helpers that can be extended to group most used rules
%position-fixed
position: fixed
%position-relative
position: relative
%position-absolute
position: absolute
%width-100
width: 100%
@scerelli
scerelli / _buttons.sass
Created June 9, 2015 10:42
A simply way to create components with same structure but based on different color schemes using sass, in this example i create a set of buttons based on a variable map then looping on it i create a set of classes based on the container key. Feel free to improve this gist :) SASS 3.3 or greater is required
// BUTTONS
// check the $btn var in _variable.scss. to add buttons simply add a block of color inside
// $btn map
=btn-scheme ($type, $color)
.btn--#{$type}
background-color: map-get($color, "bg")
color: map-get($color, "text")
&:hover, &:link, &:focus, &:active
color: map-get($color, "text")
text-decoration: none