Simple MS SQL Server ORM for NodeJS. Built with Squel.
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
| var express = require('express'); | |
| var app = express(); | |
| // middleware que obtiene los roles del usuario actual | |
| app.use(function (req, res, next){ | |
| if(req.query.admin){ | |
| req.role = "admin"; |
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
| namespace UmbracoExtensions | |
| { | |
| public static class HtmlHelperExtensions | |
| { | |
| public static IHtmlString CachedPartial( | |
| this HtmlHelper htmlHelper, | |
| string partialViewName, | |
| object model, | |
| int cachedSeconds, |
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
| #!/bin/bash | |
| # Requirements: | |
| # - mysqldump | |
| echo "Running backup plan $1"; | |
| source $1; | |
| database_dump_file="$backup_dir/database.sql"; |
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
| #!/bin/bash | |
| version=`date +%Y%m%d-%k%M%S`; | |
| source_dir=".."; | |
| deploy_dir=`pwd`; | |
| package_dir="$deploy_dir/$version/"; | |
| package_file="$deploy_dir/$version.zip"; | |
| echo "Generando deploy #$version"; |
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
| { | |
| "name": "servilin", | |
| "version": "1.0.0", | |
| "author": "Federico Cingolani <mail@fcingolani.com.ar>", | |
| "keywords": [ | |
| "http", | |
| "server" | |
| ], | |
| "dependencies" : { | |
| "connect" : "*" |
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
| #!/bin/sh | |
| base_url="http://tapas.clarin.com/tapa" | |
| cy=1945 | |
| cm=08 | |
| cd=28 | |
| ty=`date +%Y` | |
| tm=`date +%m` |
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 | |
| error_reporting(E_ALL ^ E_NOTICE); | |
| define( 'WXR_VERSION', '1.2' ); | |
| /** | |
| * Generates the WXR export file for download | |
| * | |
| * @since 2.1.0 | |
| * |
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 | |
| function import_csv_to_sqlite(&$pdo, $csv_path, $options = array()) | |
| { | |
| extract($options); | |
| if (($csv_handle = fopen($csv_path, "r")) === FALSE) | |
| throw new Exception('Cannot open CSV file'); | |
| if(!$delimiter) | |
| $delimiter = ','; |