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
git diff /root/.viminfo | |
diff --git a/root/.viminfo b/root/.viminfo | |
index 71bf900..797e089 100644 | |
--- a/root/.viminfo | |
+++ b/root/.viminfo | |
@@ -8,8 +8,8 @@ | |
# hlsearch on (H) or off (h): | |
~h | |
# Command Line History (newest to oldest): | |
-:wq |
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
git status | |
On branch master | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
(commit or discard the untracked or modified content in submodules) | |
modified: proc/self | |
modified: proc/thread-self | |
modified: run/log/journal/195a303ea1c8760dc28e54315b1c54bb/system.journal |
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
-TARGETS = console-setup mountkernfs.sh resolvconf ufw plymouth-log apparmor hostname.sh x11-common screen-cleanup lm-sensors udev cryptdisks cryptdisks-early open-iscsi networking iscsid checkroot.sh lvm2 checkfs.sh rpcbind urandom hwclock.sh mountdevsubfs.sh mountall.sh bootmisc.sh mountall-bootclean.sh checkroot-bootclean.sh kmod mountnfs.sh mountnfs-bootclean.sh procps | |
+TARGETS = console-setup mountkernfs.sh resolvconf ufw plymouth-log hostname.sh x11-common screen-cleanup lm-sensors udev cryptdisks cryptdisks-early open-iscsi networking iscsid checkroot.sh lvm2 checkfs.sh rpcbind urandom hwclock.sh mountdevsubfs.sh mountall.sh bootmisc.sh mountall-bootclean.sh checkroot-bootclean.sh kmod mountnfs.sh mountnfs-bootclean.sh procps |
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
git status | |
On branch master | |
Changes not staged for commit: | |
(use "git add/rm <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
(commit or discard the untracked or modified content in submodules) | |
deleted: etc/apparmor.d/cache/.features | |
deleted: etc/apparmor.d/cache/lxc-containers | |
deleted: etc/apparmor.d/cache/sbin.dhclient |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
class generateToken { | |
public function crypto_rand_secure($min, $max) { | |
$range = $max - $min; | |
if ($range < 0 ) { return $min; } | |
$log = log($range, 2); | |
$bytes = (int) ( $log / 8 ) + 1; | |
$bits = (int) $log + 1; |
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 | |
class XmlToJson { | |
public function Parse ($url) { | |
$fileContents= file_get_contents($url); | |
$fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents); | |
$fileContents = trim(str_replace('"', "'", $fileContents)); | |
$simpleXml = simplexml_load_string($fileContents); | |
$json = json_encode($simpleXml); | |
return $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
public function getAppointmentBlocksInRange($start, $end, $agent) { | |
$em = $this->em; | |
$rsm = new ResultSetMapping(); | |
$rsm->addScalarResult('id', 'id'); | |
$rsm->addScalarResult('startTime', 'startTime'); | |
$rsm->addScalarResult('startTime1', 'startTime1'); | |
$rsm->addScalarResult('endTime', 'endTime'); | |
$rsm->addScalarResult('endTime1', 'endTime1'); | |
$rsm->addScalarResult('caseManager', 'caseManager'); |
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
SELECT a.id as id, DATE(a.startTime) AS startTime, DATE(a.endTime) AS endTime, a.startTime AS startTime1, | |
a.endTime AS endTime1, CONCAT(p.`first_name`, ' ', p.last_name) as `caseManager` FROM appointmentBlock a | |
JOIN `User` p ON p.id = a.`caseManager_id` WHERE a.startTime BETWEEN :start AND :end | |
GROUP BY a.startTime, a.caseManager_id | |
Array | |
( | |
[0] => Array | |
( | |
[id] => 1 |
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
$form = $this->createForm(new dateSelectType(), array('id'=>$id)); | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
$builder | |
->add('id', 'hidden') | |
->add('startDate', 'text', | |
array( | |
'attr' => array('class' => 'date'), | |
'required' => false, |
NewerOlder