Skip to content

Instantly share code, notes, and snippets.

View i-Captain's full-sized avatar

Andreas Cichocki i-Captain

View GitHub Profile
@i-Captain
i-Captain / frequently_used_rails_commands.md
Last active January 15, 2019 14:23
frequently used rails commands
@i-Captain
i-Captain / gcloud_-_unsorted_shell_commands.sh
Last active July 2, 2018 13:00
GCloud - unsorted shell commands
gcloud projects list
gcloud config set project myProject
# https://cloud.google.com/compute/docs/regions-zones/
gcloud config set compute/zone europe-west3-a
@i-Captain
i-Captain / twentyseventeen-child_-_functions.php
Last active June 28, 2018 13:13
Wordpress - Search private posts
<?php
// SEARCH PRIVATE POSTS
// https://wordpress.stackexchange.com/questions/110569/private-posts-pages-search
add_action('pre_get_posts','filter_search');
function filter_Search($query){
if( is_admin() || ! $query->is_main_query() ) return;
if ($query->is_search) {
if( current_user_can('edit_private_posts') ) {