Skip to content

Instantly share code, notes, and snippets.

jacek213

  • Warsaw, Poland
Block or report user

Report or block jacek213

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jacek213
jacek213 / nginx.conf
Created Feb 4, 2019 — forked from tompave/nginx.conf
nginx conf for multiple upstreams and different domains
View nginx.conf
# A commented nginx configuration file for Ruby on Rails
#
# Author: Tommaso Pavese
# tommaso@pavese.me
# http://tommaso.pavese.me
#
# License: http://www.wtfpl.net/
#
#
# Tested with:
View nginx conf with node app and statics
upstream node_app_main {
server localhost:8080;
}
server {
listen 80;
server_name od-reki.volkswagen.pl;
root /home/deploy/main-node/current/public;
View rails admin export associated value
export do
field :car_name, :string do
export_value do
bindings[:object]&.car_model&.car_name&.name
end
end
end
@jacek213
jacek213 / deploy.sh
Created Jun 29, 2018
node app deploy script
View deploy.sh
#!/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
###################################################
View poormans_elastic.rb
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}}
View paginator-section.js.coffee
# @cjsx React.DOM
@PaginatorSection = React.createClass
displayName: 'PaginatorSection'
_handleOnClick: (pageNumber) ->
@props.onPaginate(pageNumber)
_handleNextClick: (e) ->
e.preventDefault();
View paginacja anno domini 2015.js.coffee
# @cjsx React.DOM
@ArticlesSection = React.createClass
displayName: 'ArticlesSection'
getInitialState: ->
didFetchData: false
articles: []
meta:
total_pages: 0
@jacek213
jacek213 / materialize_fab_downwards.js
Last active May 8, 2017
materialize fab downwards
View materialize_fab_downwards.js
// 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)');
View webpack-conf-prod.js
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: {
You can’t perform that action at this time.