This was only tested on a partial SentinelOne installation on the High Sierra beta, where SentinelOne was never allowed to enable it's kernel extension.
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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 | |
/** | |
* This script is meant to be executed via crontab. | |
* It should help you easily set li3 commands as cron jobs. | |
* | |
* You should put this in the root of your application. | |
* However, you don't need to, but you would then need to | |
* pass a --path= option with the path to your app. | |
* This is because the li3 console command must be called | |
* from a specific location. |
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
Validator::add('isUnique', function($data, $params, $options) { | |
$model = $options['model']; | |
$field = $options['field']; | |
$key = $model::meta('key'); | |
$entity = $model::first(array('conditions' => array($field => $data))); | |
$identifier = isset($options['values'][$key]) ? $options['values'][$key] : null; | |
if ($entity && $entity->data() && $identifier == (string) $entity->$key) { |
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 | |
/** | |
* A System model to work with MongoDB from a higher level. | |
* This model will executes various commands as well as store new commands. | |
* The system.js collection is used. | |
* | |
* Warning: There be dragons in here. | |
* | |
*/ | |
namespace app\models; |
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 | |
/** | |
* Continuation routing examples. Handles URLs in the following forms: | |
* | |
* /posts | |
* /en/posts | |
* /admin/posts | |
* /admin/en/posts | |
* /admin/en/posts.json | |
* /admin/en/posts/4ef16ccc7f8b9aa331000064.json |
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 | |
/** | |
* Reusable Copyright Element for Lithium. | |
* | |
* Works without passing any options at all (except the `holder`), will make | |
* "smart" guesses. Allows customization by passing strings for `holder`, `object` | |
* or years for `begin` and `end`. | |
* | |
* Example Usage: | |
* ``` |
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
/** | |
* General info: | |
* Embed this code in your lithium (li3) app. | |
* At the end of the app\config\connections.php for example. | |
* | |
* Uncomment the var_dump lines OR use the lithium Logger Class | |
* Use/modify the first callback, if you just want to see the query array data. | |
* Use the second callback for dumping the raw sql data. | |
* | |
* @author: 2011 weluse GmbH, Marc Schwering |