Skip to content

Instantly share code, notes, and snippets.

View metodribic's full-sized avatar

Metod Ribič metodribic

  • Working at Better
  • Slovenia
View GitHub Profile
@metodribic
metodribic / siblings.md
Last active March 3, 2022 06:12
CSS sibling selectors comparison

Direct children selector >

Example:

.a > .b {
  border: 1px solid #eee;
}
@metodribic
metodribic / remove_uniquie_raw.sh
Created August 24, 2018 16:05
Remove all CR2 (raw image) files if they don't have corresponding JPG sibling
#!/bin/bash
# Remove all CR2 (raw image) files if they don't have corresponding JPG sibling
allJpgs="$(ls|grep .JPG)"
allRaws="$(ls|grep .CR2)"
allowedRaws=()
for file in $allJpgs
do
allowedRaws+=(${file/JPG/CR2})
@metodribic
metodribic / .htaccess
Created June 1, 2018 06:04
Apache2 .htaccess for angular2 app hosted in subdirectories
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subdirectory
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.html [L]
</IfModule>
@metodribic
metodribic / aql.sublime-syntax
Last active January 3, 2018 07:51
AQL syntax definition for sublime text 3
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- aql
scope: source.aql
contexts:
# The prototype context is prepended to all contexts but those setting
# meta_include_prototype: false.
@metodribic
metodribic / word-count-by-file-extension.sh
Created May 24, 2017 11:54
Count number of lines in files with specific extension
find . -name "*.ts" -print | xargs wc -l