One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
# In the command line, find the PID of your simulator process: | |
ps -p `pgrep launchd_sim` | |
# or if you have many simulators running: | |
ps -A | grep launchd_sim | |
# Find the PID of the WebContent process: | |
pgrep -P <simulator-pid> 'com.apple.WebKit.WebContent' | |
# kill it |
#!/usr/bin/ruby | |
# | |
# gather a few statistics and find all flagged comments | |
# | |
# Usage: | |
# rfluff [-qf] [tag] [tag] ... | |
# | |
# -qf outputs a vim compatible quickfix format, otherwise | |
# the output is human readable |
# The workspace_utils.py module includes an iterator wrapper called keep_awake and a context manager | |
# called active_session that can be used to maintain an active session during long-running processes. | |
# The two functions are equivalent, so use whichever fits better in your code. | |
# | |
# EXAMPLE 1 | |
# | |
# from workspace_utils import keep_awake | |
# for i in keep_awake(range(5)): #anything that happens inside this loop will keep the workspace active | |
# # do iteration with lots of work here | |
# |
"""Helper functions for working with audio files in NumPy.""" | |
"""some code borrowed from https://github.com/mgeier/python-audio/blob/master/audio-files/utility.py""" | |
import numpy as np | |
import contextlib | |
import librosa | |
import struct | |
import soundfile | |
def float_to_byte(sig): |
<?php | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
<?php | |
require dirname(__FILE__).'/wp-blog-header.php'; | |
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); |
#!/bin/bash | |
set -e | |
show_help() { | |
cat << EOF | |
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE] | |
${0##*/} -h | |
Open a standard connection in Sequel PRO. |
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php