strace -e trace=file -fp PID (file) or strace -e trace=desc -fp PID (file descriptors)
Common calls:
accessclose– close file handlefchmod– change file permissionsfchown– change file ownership
| - Open Automator | |
| - File -> New -> Service | |
| - Change "Service Receives" to "files or folders" in "Finder" | |
| - Add a "Run Shell Script" action | |
| - Change "Pass input" to "as arguments" | |
| - Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
| - Save it as something like "Open in Visual Studio Code" |
| <?php | |
| /** | |
| * Plugin Name: Formidable MediaVault | |
| * Plugin URI: https://www.formidablepro.com | |
| * Description: This plugin will allow you to use | |
| * Version: 1.0.0 | |
| * Author: Strategy11 | |
| * Author URI: http://strategy11.com | |
| * License: GPL2 | |
| */ |
Curated list of useful gulp plugins for awesome and easy frontend web development.
| // Add VAT and SSN fields in billing address display | |
| add_filter( 'woocommerce_order_formatted_billing_address', 'custom_add_vat_ssn_formatted_billing_address', 10, 2 ); | |
| function custom_add_vat_ssn_formatted_billing_address( $fields, $order ) { | |
| $fields['vat'] = $order->billing_vat; | |
| $fields['ssn'] = $order->billing_ssn; | |
| return $fields; | |
| } | |
| add_filter( 'woocommerce_my_account_my_address_formatted_address', 'custom_my_account_my_address_formatted_address', 10, 3 ); |
| /* | |
| * The default style sheet used to render HTML. | |
| * | |
| * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | |
| * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | |
| * | |
| * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. |
| <?php | |
| class NSLookup { | |
| private $root_servers = array( | |
| 'a.root-servers.net.', | |
| 'b.root-servers.net.', | |
| 'c.root-servers.net.', | |
| 'd.root-servers.net.', | |
| 'e.root-servers.net.', | |
| 'f.root-servers.net.', | |
| 'g.root-servers.net.', |
| <?php | |
| class SecureSessionHandler extends SessionHandler { | |
| protected $key, $name, $cookie; | |
| public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
| { | |
| $this->key = $key; | |
| $this->name = $name; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | |
| <title>Google Maps Multiple Markers</title> | |
| <script src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
| <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.1.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="map" style="width: 500px; height: 400px;"></div> |
| define([ | |
| 'jquery', | |
| 'underscore', | |
| 'backbone', | |
| 'marionette', | |
| 'handlebars', | |
| 'text!templates/app_view.html', | |
| 'modules/mainMenuView/mainMenuView', |