Skip to content

Instantly share code, notes, and snippets.


Lukasz Piliszczuk lukaspili

View GitHub Profile
pyrliu / .gitlab-ci.yml
Last active March 23, 2020 16:42
graphile-migrate with GitLab CI (community edition) "post-merge-master" validate, commit and push back to master
View .gitlab-ci.yml
- pre-build
image: node:12
stage: pre-build
- master
allow_failure: false
singingwolfboy / PgTypesLibphonenumberPlugin.ts
Last active February 14, 2020 17:55
A plugin for Postgraphile that provides support for the "phone_number" type from pg_libphonenumber: Note that this support requires installing libphonenumber-js on the Postgraphile server:
View PgTypesLibphonenumberPlugin.ts
import { Plugin, Build, ScopeGraphQLScalarType } from "graphile-build";
import { PhoneNumber, parsePhoneNumber } from "libphonenumber-js";
declare module "graphile-build" {
interface ScopeGraphQLScalarType {
isPhoneNumberScalar: boolean;
export default (function PgTypesLibphonenumberPlugin(builder) {
View overlay_container.dart
import 'package:flutter/material.dart';
class OverlayContainer extends StatefulWidget {
/// The child to render in the regular document flow (defaults to Container())
final Widget child;
/// The widget to render inside the [OverlayEntry].
final Widget overlay;
/// Offset to apply to the [CompositedTransformFollower]
slightfoot / rubber_range_picker.dart
Last active January 19, 2023 01:09
Rubber Range Picker - Based on by Cuberto - 14th March 2019
View rubber_range_picker.dart
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatelessWidget {
VladSumtsov /
Created July 20, 2016 19:06
Flow mortar ViewPager Adapter with save state. Logic of saving state took from FragmentStatePagerAdapter.
package com.ghm.ui.adapter;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
abhinavmsra /
Created July 11, 2016 09:13
DRY JSON Parsing in Rspec Tests
# spec/support/request_helpers.rb
module Requests
  module JsonHelpers
    def json
import android.content.Context;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
dodyg / gist:5823184
Last active March 26, 2023 11:14
Kotlin Programming Language Cheat Sheet Part 1
View gist:5823184


Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

kalmbach / gist:4471560
Created January 7, 2013 01:27
Rake task sugar for Sequel Migrations (version, migrate, rollback, reset)
View gist:4471560
namespace :db do
require "sequel"
Sequel.extension :migration
DB = Sequel.connect(ENV['DATABASE_URL'])
desc "Prints current schema version"
task :version do
version = if DB.tables.include?(:schema_info)
end || 0
3dd13 / ruby_ftp_example.rb
Created November 5, 2011 17:08
Sample code of using Ruby Net::FTP library. Login to FTP server, list out files, check directory existence, upload files
View ruby_ftp_example.rb
require 'net/ftp'
CONTENT_SERVER_FTP_LOGIN = "saucy-ftp-server-login"
CONTENT_SERVER_FTP_PASSWORD = "saucy-ftp-server-password"
# LOGIN and LIST available files at default home directory, CONTENT_SERVER_FTP_LOGIN, CONTENT_SERVER_FTP_PASSWORD) do |ftp|
files = ftp.list