Skip to content

Instantly share code, notes, and snippets.

View incidunt's full-sized avatar

incidunt incidunt

View GitHub Profile
System process daemons that are system-wide provided by mac os x are described by launchd preference files that can be showed with the command:
$ sudo ls -all /System/Library/LaunchDaemons/
Third party process daemons that are system-wide provided by the administrator are described by preference files that can be showed with the command:
$ sudo ls -all /Library/LaunchDaemons/
Launch Agents that are per-user provided by mac os x usually loaded when the user logs in. Those provided by the system can be found with:
$ sudo ls -all /System/Library/LaunchAgents/
Launch Agents that are per-user provided by the administrator and usually loaded when the user logs in. Those provided by the system can be found with:
@incidunt
incidunt / Handler.php
Created May 16, 2019 17:33 — forked from collegeman/Handler.php
Boilerplated files for Lumen-based WordPress plugins
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
@incidunt
incidunt / functions.php
Created April 29, 2019 03:24 — forked from srikat/functions.php
Fading in last sidebar widget as it is scrolled to and making it fixed in Genesis. http://sridharkatakam.com/fade-last-sidebar-widget-scrolled-make-fixed-genesis/
add_action( 'wp_enqueue_scripts', 'enqueue_sticky_last_widget' );
function enqueue_sticky_last_widget() {
wp_enqueue_style( 'animate', get_stylesheet_directory_uri() . '/css/animate.min.css' );
wp_enqueue_script( 'waypoints', get_stylesheet_directory_uri() . '/js/waypoints.min.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'waypoints-init', get_stylesheet_directory_uri() .'/js/waypoints-init.js' , array( 'jquery', 'waypoints' ), '1.0.0' );
wp_enqueue_script( 'jquery-sticky', get_stylesheet_directory_uri() .'/js/jquery.sticky.js' , array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'jquery-sticky-init', get_stylesheet_directory_uri() .'/js/jquery.sticky.init.js' , array( 'jquery-sticky' ), '1.0.0' );
@incidunt
incidunt / gist:fe1a6d9e1551cf0b668f140fe82b50d0
Created April 14, 2019 13:09 — forked from jeremyfelt/gist:2625350
Post type argument test results
'rewrite' => true
'public' => true 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine
'public' => false 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine
'public' => true 'publicly_queryable' => false /cpt-slug/cpt-post-slug 404 Error
'public' => false 'publicly_queryable' => true /cpt-slug-cpt-post-slug 404 Error
'rewrite' => false
'public' => true 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine
'public' => true 'publicly_queryable' => true /?p=ID&post_type=cpt-slug Loads fine
'public' => false 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine
@incidunt
incidunt / 用pandas过滤出WordPress精品插件.ipynb
Last active March 31, 2019 10:55
用pandas过滤出WordPress精品插件.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@incidunt
incidunt / 获取WordPress插件的icon地址 .ipynb
Created March 31, 2019 10:12
获取WordPress插件的icon地址
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@incidunt
incidunt / page-best-wordpress-plugins.php
Created March 31, 2019 06:50
page-best-wordpress-plugins.php
<?php
/**
* Template Name: bestwordpressplugins
*/
// Forces full width content layout.
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
add_action( 'wp_head', 'custom_genesis_page_builder_styles' );
/**
<?php
add_action( 'wp_head', 'custom_genesis_page_builder_styles' );
/**
* Echo the necessary "Full Page Width" styles into the head of the page.
* Credit for the following CSS goes to the developer of the "Genesis Dambuster"
* Plugin as this CSS is an edited version of that Plugin's full-width.css file.
*/
function custom_genesis_page_builder_styles() {
echo '
<style type="text/css">
@incidunt
incidunt / about-wordpress-plugin-deveploers.ipynb
Created March 14, 2019 04:49
用Python分析WordPress官网所有插件的开发者信息
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@incidunt
incidunt / data-analysis-about-wordpress-plugin-authors.ipynb
Last active March 12, 2019 17:13
用python分析wordpress官网所有插件的开发者信息
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.