Skip to content

Instantly share code, notes, and snippets.

View jacek213's full-sized avatar

Jacek Grzybowski jacek213

View GitHub Profile
@jacek213
jacek213 / puma.rb
Created March 23, 2017 16:34
puma conf
# Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum, this matches the default thread size of Active Record.
#
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
threads threads_count, threads_count
# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
@jacek213
jacek213 / webpack-conf-prod.js
Created April 13, 2017 12:06
webpack config prod
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin')
module.exports = {
context: __dirname,
entry: './src/index.js',
output: {
@jacek213
jacek213 / materialize_fab_downwards.js
Last active May 8, 2017 10:50
materialize fab downwards
// Patches https://github.com/Dogfalo/materialize/blob/b03030ed5c5ea2018424e2b6a73084f65e8ec63d/js/buttons.js
// minor changes here, search for `downwards`
(function ($) {
angular.element(document).ready(function() {
// jQuery reverse
$.fn.reverse = [].reverse;
// unbind existing handlers
angular.element(document).off('mouseenter.fixedActionBtn', '.fixed-action-btn:not(.click-to-toggle)');
# @cjsx React.DOM
@ArticlesSection = React.createClass
displayName: 'ArticlesSection'
getInitialState: ->
didFetchData: false
articles: []
meta:
total_pages: 0
# @cjsx React.DOM
@PaginatorSection = React.createClass
displayName: 'PaginatorSection'
_handleOnClick: (pageNumber) ->
@props.onPaginate(pageNumber)
_handleNextClick: (e) ->
e.preventDefault();
module Alfalek
class MegaSearch < Grape::API
INDEX_SOURCE = [
{klass: Doctor, cols: %w{title fname lname short_description}},
{klass: DiagnosticCategory, cols: %w{name description}},
{klass: LaboratoryCategory, cols: %w{name description}},
{klass: MicrobiologyCategory, cols: %w{name description}},
{klass: RehabilitationCategory, cols: %w{name description}},
{klass: TreatmentCategory, cols: %w{name description}}
@jacek213
jacek213 / deploy.sh
Created June 29, 2018 14:31
node app deploy script
#!/bin/bash
set -e
set -o pipefail
########### USER CONFIGURABLE OPTS ################
REMOTE_ADDR=example.com
GIT_REMOTE=git@git.example.com:example/app.git
CACHE_DIR=tmp/.cache
###################################################
@jacek213
jacek213 / History|-15bd721e|entries.json
Last active April 10, 2022 18:16
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/jacekgrzybowski/workspace/leaflogix/components-lib/src/components/DutchieTable/Table.tsx","entries":[{"id":"wRGn.tsx","source":"Fix all ESLint auto-fixable problems","timestamp":1649350478188},{"id":"QYNR.tsx","source":"Fix all ESLint auto-fixable problems","timestamp":1649350504467},{"id":"uy0A.tsx","timestamp":1649350740149},{"id":"b8pX.tsx","source":"undoRedo.source","timestamp":1649350838686},{"id":"Xueq.tsx","timestamp":1649350968932},{"id":"irkr.tsx","timestamp":1649351022549},{"id":"5XEc.tsx","source":"Fix all ESLint auto-fixable problems","timestamp":1649351081971},{"id":"0RCw.tsx","source":"undoRedo.source","timestamp":1649352265955}]}
export do
field :car_name, :string do
export_value do
bindings[:object]&.car_model&.car_name&.name
end
end
end