Skip to content

Instantly share code, notes, and snippets.

View janstol's full-sized avatar

Jan Štol janstol

View GitHub Profile
@pauldruziak
pauldruziak / gem-install-libv8-darwin-21.sh
Created December 1, 2021 20:20
./gem-install-libv8-darwin-21.sh 7.3.492.27.1
#!/bin/bash
# filename: gem-install-libv8-darwin-20.sh
set -e
set -u
set -o pipefail
libv8_version="${1:-"8.4.255.0"}"
from='19'
to='21'
@mjohnsullivan
mjohnsullivan / draggable_custom_painter.dart
Created November 26, 2019 21:32
Handling draggable areas or elements drawn on a Flutter CustomPainter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Draggable Custom Painter',
home: Scaffold(
@slightfoot
slightfoot / multi_select.dart
Last active August 3, 2023 18:10
Multi Select GridView in Flutter - by Simon Lightfoot (Drag to select multiple items) Try now here: https://dartpad.dev/?id=a002dd1e031f5f012f810c6d5da14a11
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@bazzel
bazzel / README.md
Last active May 26, 2021 04:20
Rails 6 and Bootstrap 4

This blogpost shows how to setup Rails 6 with Bootstrap 4.

This snippet shows a somehow different and less customized approach.

$ rails new rails6-bootstrap4
$ bundle --binstubs
$ yarn add bootstrap jquery popper.js expose-loader
@kpfefferle
kpfefferle / rails_month_dates.js
Created February 28, 2012 02:02
jQuery: Limit day in Rails date_select based on month and year
$(function(){
railsMonthDates();
$("select[id*=_2i], select[id*=_1i]").change( railsMonthDates );
});
function railsMonthDates() {
$("select[id*=_2i]").each(function(){
$monthSelect = $(this);
$daySelect = $(this).siblings("select[id*=_3i]");
$yearSelect = $(this).siblings("select[id*=_1i]");