Jakub Chodorowicz
Young/Skilled
@chodorowicz
github.com/chodorowicz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
wp_dropdown_categories(array( | |
show_option_none => "Choose city", | |
show_count => 0, | |
orderby => "name", | |
taxonomy => "city", | |
name => "city", | |
selected => $city | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$taxonomy_name = 'course-category'; | |
$term_object = $wp_query->queried_object; | |
$get_terms_args = array( | |
'taxonomy' => $taxonomy_name, | |
'parent' => $term_object->term_id, | |
'hide_empty' => false | |
); | |
$term_children = get_terms($get_terms_args); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function serializeForm($form) { | |
return $form.serializeArray().reduce( (result, input) => { | |
result[input.name] = input.value; | |
return result; | |
}, {} | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
".text.html.nunjucks": | |
"expand-region": | |
commands: [ | |
{ | |
command: 'expand-region:select-word-include-dash-and-dot', | |
recursive: false | |
}, | |
{ | |
command: 'expand-region:select-inside-double-quotes' | |
recursive: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export syncpath="/path/to/folder/" | |
export remotepath="sftp://aaa@000.000.000.000:2222/remote/path/" | |
export duckParameters="-y -existing overwrite -p PASSWORD --upload"; | |
fswatch -0 ${syncpath} | xargs -0 -I % -t bash -c 'f="%"; rel=${f#"${syncpath}"}; duck ${duckParameters} ${remotepath}${rel} "${f}"; echo ${rel};' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var postcss = require('gulp-postcss'); | |
var autoprefixer = require('autoprefixer'); | |
var browserSync = require('browser-sync'); | |
var lost = require('lost'); | |
gulp.task('sass', function () { | |
gulp.src('./frontend/sass/main.scss') | |
.pipe(sass().on('error', sass.logError)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const browserSync = require('browser-sync').create(); | |
const port = process.env.PORT || 8080; | |
const customDomain = environment.DEV_DOMAIN ? `${environment.DEV_DOMAIN}` : 'localhost'; | |
browserSync.init('**/*.css', { | |
logPrefix: 'Showroom:', | |
proxy: `localhost:${port}`, | |
open: false, | |
host: customDomain, | |
port: 3000, | |
ghostMode: false, /* don't mirror interactions in other browsers */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $pjaxContainer = $('.js-pjaxContainer'); | |
function pjaxLoad(target) { | |
$.pjax({ | |
url: target, | |
container: '.js-pjaxContainer', | |
fragment: '.js-pjaxContainer', | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
resolve: { | |
alias: { | |
waypoints: 'waypoints/lib/noframework.waypoints', | |
}, | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /node_modules\/waypoints\/lib\/noframework\.waypoints\.js$/, |