ulimit -a
mcedit /etc/sysctl.conf
add:
fs.file-max = 100000
<?php | |
// Retrieve the signature from the request headers and decode it from base64 | |
$signature_base64 = $request->header('X-MailPace-Signature'); | |
$signature = base64_decode($signature_base64); | |
if ($signature === false) { | |
// Invalid signature encoding | |
abort(400, 'Invalid signature encoding'); | |
} | |
// Decode your public key from base64 |
#!/bin/bash | |
file="/etc/pam.d/sudo" | |
line_to_add="auth sufficient pam_tid.so" | |
# Check if the line already exists in the file | |
if grep -q "$line_to_add" "$file"; then | |
echo "Line already exists in $file." | |
else | |
# Add the line after the comment lines |
CREATE TABLE `test_table` ( | |
`age_from` tinyint(2) NOT NULL, | |
`age_to` tinyint(2) NOT NULL, | |
`gender` enum('M','V') NOT NULL, | |
`norm_min` float NOT NULL, | |
`norm_max` float NOT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
ALTER TABLE `test_table` | |
ADD KEY `age_from` (`age_from`), |
ulimit -a
mcedit /etc/sysctl.conf
add:
fs.file-max = 100000
<?php | |
namespace App\Traits; | |
use Illuminate\Http\Request; | |
use Symfony\Component\HttpFoundation\Response as SymfonyResponse; | |
trait ApiRespond | |
{ | |
/** |
[Unit] | |
Description=supervisord - Supervisor process control system for UNIX | |
Documentation=http://supervisord.org | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf | |
ExecReload=/bin/supervisorctl reload | |
ExecStop=/bin/supervisorctl shutdown |
sudo pmset -a destroyfvkeyonstandby 1 | |
sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist ProgramArguments -array-add "-NoMulticastAdvertisements" | |
sudo defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
sudo defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true | |
sudo pmset -a hibernatemode 0 | |
#sudo pmset -a hibernatemode 3 | |
sudo defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false | |
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.captive.control Active -bool false |
package sri | |
import ( | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"io/ioutil" | |
) | |
func Generate256(file string) (string, error) { |
#!/usr/bin/php | |
<?php | |
function contains($needle, $haystack) | |
{ | |
return stripos($haystack, $needle) !== false; | |
} | |
$files = shell_exec('git diff-index --name-only --cached --diff-filter=ACMR HEAD'); | |
$files = explode("\n", trim($files)); |
<?php | |
namespace App\Repositories; | |
use Illuminate\Cache\Repository; | |
class CacheRepository extends Repository | |
{ | |
public function has($key) | |
{ |