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
class Set | |
set = {} | |
col = [] | |
has: (item) -> | |
set.hasOwnProperty item | |
refresh: (item, opt_) -> | |
col = Object.keys set |
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
extend = (inject, template) -> | |
(template[prop] = inject[prop]) for own prop of inject | |
null | |
init_namespace = (nameString, obj, container) -> | |
container ?= window | |
names = nameString.split('.') | |
(container[name] or= {} ; | |
container = container[name]) while name = names.shift() | |
extend(obj, container) |
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
@echo off | |
pushd %1 | |
"C:\Program files\PDFCreator\Images2PDF\Images2PDFC.exe" /i "%1\*.tif" /e "%1\compilado.pdf" | |
"%1\compilado.pdf |
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
@ECHO OFF | |
REM DANGER: Erase subdirectories without prompting user previously! | |
FOR /D /R %%D IN (*) DO ( | |
ECHO erasing %%D | |
RD /S /Q %%D | |
) | |
REM We use the output of SHOW DATABASES to build our list | |
FOR /F "usebackq tokens=1-2 delims=| " %%D in (`mysql -h %BackupHost% -u %BackupUser% -p%BackupPass% -e "show databases;"`) DO ( | |
REM Nested if's to exclude unwanted entries in list | |
IF NOT "%%D" == "Database" ( |
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
@ECHO OFF | |
REM mysql DATE_FORMAT tokens: %W (weekday name) %M (month name) %d (month day) %Y (year) | |
SET timeformatstring='%%W_%%M-%%d-%%Y' | |
REM FOR /F takes output from `time /t` and tokenizes it in %A %B and %C | |
FOR /F "usebackq tokens=1-4 delims=: " %%A IN (`time /t`) DO ( | |
REM takes localized output from mysql NOW() string built with tokens in %timeformatsring% | |
FOR /F "usebackq tokens=1-2 skip=1 delims=| " %%H IN (`mysql -h %dbHost% -u %dbUser% -p%dbPass% -e "SET @@lc_time_names='es_MX'; SELECT UPPER(DATE_FORMAT(NOW(), %timeformatstring%));"`) DO ( | |
ECHO Creating log file with date: %%H and time: %%A%%B%%C | |
REM CMD equivalent of Unix touch? http://superuser.com/a/764725 | |
TYPE NUL >> %%H_%%A%%B%%C && COPY %%H_%%A%%B%%C +,, |
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
@ECHO OFF | |
SET timeformatstring='%%W_%%M-%%d-%%Y' | |
FOR /F "usebackq tokens=1-4 delims=: " %%A IN (`time /t`) DO ( | |
FOR /F "usebackq tokens=1-2 skip=1 delims=| " %%H IN (`mysql -h %dbHost% -u %dbUser% -p%dbPass% -e "SET @@lc_time_names='es_MX'; SELECT UPPER(DATE_FORMAT(NOW(), %timeformatstring%));"`) DO ( | |
ECHO Creating log in %dbBackDir% for backup job started at: %%H and time: %%A%%B%%C | |
:: Getting output from script called through new shell: http://superuser.com/a/661678 | |
START "" /B /WAIT /HIGH CMD /C %dbBackDir%\backups_worker.bat ^> %dbBackDir%\%%H_%%A%%B%%Clog 2^>^&1 | |
:: CMD equivalent of Unix touch? http://superuser.com/a/764725 | |
COPY %dbBackDir%\%%H_%%A%%B%%Clog +,, | |
) |
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 | |
namespace Forms; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
/** | |
* Builds a form to select a date range | |
* | |
* @author Jesús Franco Martínez | |
*/ |
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
<body> | |
<div class="radio_panels"> | |
<h1>Demo of checkbox hack for panelized sections</h1> | |
<input type="radio" name="selecta" id="section1_chkbox" /> | |
<label for="section1_chkbox">My first section</label> | |
<input type="radio" name="selecta" id="section2_chkbox" /> | |
<label for="section2_chkbox">My second section</label> | |
<div id="section1" class="panel"> | |
<h2>My first section</h2> | |
<p>The content for my awesome panel 1</p> |
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 | |
/** | |
* @author Jesus Franco Martinez <[email protected]> | |
*/ | |
class DBStream { | |
/** | |
* | |
* @var mysqli | |
*/ |
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 AbstractClassReflectable | |
{ | |
/** | |
* @var \ReflectionClass | |
*/ | |
private $_reflector; | |
private $_reflectedProperties; | |
public function getProperties() |
OlderNewer