Skip to content

Instantly share code, notes, and snippets.

View godot's full-sized avatar

dariusz gorzeba godot

View GitHub Profile

layer 0 ![[Pasted image 20260101164339.png]] layer 1 ![[Pasted image 20260101164424.png]] layer 2 ![[Pasted image 20260101164619.png]] layer 3

![[Pasted image 20260101164732.png]]

set -eu
enable_data_clean() {
mkdir -p /tmp/allow-data-clean/app
cp app/config.yml /tmp/allow-data-clean/app
cd /tmp/allow-data-clean
echo 'allow_data_clean: true' >> app/config.yml
pos-cli deploy -p
set -eu
enable_data_clean() {
mkdir -p /tmp/allow-data-clean/app
cp app/config.yml /tmp/allow-data-clean/app
cd /tmp/allow-data-clean
echo 'allow_data_clean: true' >> app/config.yml
pos-cli deploy -p
//= require react_app
@godot
godot / gist:c1f21c9c83ed22fd914a
Created January 24, 2016 18:36
show-changes.sh
#!/bin/sh
today=`date --date="$1 day ago" +"%Y-%m-%d"`
git log --pretty=format:"%Cblue%cd %Creset %Cred%s %N" --no-merges --author=$2 --date=short --since=$today
#git log --pretty=format:"%Creset %Cred%s %N" --no-merges --author=$2 --date=short --since=$today
@godot
godot / pre-commit.sh
Last active August 29, 2015 14:08
git hook preventing debugging code commiting
#!/bin/bash
FUNCTIONS='pry|console\.log|binding\.pry|debugger'
SKIP=('Gemfile.lock' 'Gemfile')
RESULT=""
for file in `git diff-index HEAD --name-only` ; do
allow=true
for ignore in "${SKIP[@]}"
.switch
= check_box_tag :visible, true, {}, id: 'switch'
= label_tag :visible, '', for: 'switch'
module Core
module Extentions
def has_offer
end
def has_content
end
end
module ItemFactory
def create type, *params, &block
begin
@godot
godot / symmetry_point.rb
Created May 28, 2012 18:39
symmetryPoint
# Complexity:
# expected worst-case time complexity is O(length(S));
# expected worst-case space complexity is O(1) (not counting the storage required for input arguments).
require 'spec_helper'
def symmetryPoint(input)
return -1 if input.size % 2 == 0
return 0 if input.size == 1
class FieldSet
attr_accessor :fields
def initialize options={}
@fields = FieldSet::build(options)
end
def self.build options
case options
when Array