This file contains hidden or 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
#!/usr/bin/env bash | |
loadkeys it | |
timedatectl set-ntp true | |
mkfs.ext4 /dev/nvme0n1p2 | |
mkfs.ext4 /dev/nvme0n1p4 | |
mkfs.ext4 /dev/nvme0n1p5 | |
mkswap /dev/nvme0n1p9 |
This file contains hidden or 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
#!/usr/bin/env bash | |
loadkeys it | |
timedatectl set-ntp true | |
mkfs.ext4 /dev/nvme0n1p2 | |
mkfs.ext4 /dev/nvme0n1p4 | |
mkfs.ext4 /dev/nvme0n1p5 | |
mkswap /dev/nvme0n1p9 |
This file contains hidden or 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 | |
class ArrayFlat | |
{ | |
public function execute($arg): array | |
{ | |
return is_array($arg) ? array_reduce($arg, function ($c, $a) { | |
return array_merge($c, $this->execute($a)); | |
}, []) : [$arg]; | |
} |
This file contains hidden or 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
yaourt --m-arg "--skippgpcheck" -S {{ package }} | |
### | |
--skipinteg | |
Do not perform any integrity checks (checksum and PGP) | |
on source files. | |
--skipchecksums | |
Do not verify checksums of source files. |
This file contains hidden or 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
<script> | |
var eventHandler =function (event) { | |
console.log('Event: ' + event.type); | |
// console.log(event.timeStamp); | |
console.log('Document state: '+document.readyState); | |
var end = new Date().getTime(); | |
var time = end - start; | |
console.log('Execution time: ' + time); | |
console.log('\n'); |
This file contains hidden or 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
public function getCacheDir() | |
{ | |
if (in_array($this->environment, array('dev'))) { | |
return '/dev/shm/site/cache/' . $this->environment; | |
} | |
return parent::getCacheDir(); | |
} | |
public function getLogDir() |
This file contains hidden or 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
#!/usr/bin/env bash | |
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1` | |
FOLDERS="var/cache var/logs var/sessions" | |
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX $FOLDERS | |
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX $FOLDERS | |
sudo chown -R `whoami`:`whoami` $FOLDERS |
This file contains hidden or 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 | |
/** | |
* Mysqldump File Doc Comment | |
* | |
* PHP version 5 | |
* | |
* @category Library | |
* @package Ifsnop\Mysqldump | |
* @author Michael J. Calkins <[email protected]> | |
* @author Diego Torres <[email protected]> |
This file contains hidden or 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 | |
$xml = simplexml_load_file("app/etc/local.xml"); | |
$db_host = (string)$xml->global->resources->default_setup->connection->host; | |
$db_name = (string)$xml->global->resources->default_setup->connection->dbname; | |
$db_username = (string)$xml->global->resources->default_setup->connection->username; | |
$db_password = (string)$xml->global->resources->default_setup->connection->password; | |
$mysqldump = trim(shell_exec("which mysqldump")); |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
int *array; | |
size_t used; | |
size_t size; | |
} Array; | |
NewerOlder