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
<?xml version="1.0" encoding="utf-8"?> | |
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:dao="dao.*" | |
xmlns:local="*" | |
xmlns:supportClasses="spark.skins.mobile.supportClasses.*" | |
creationComplete="data=moduleSrv.getScheduleModules()" title="Calendário" | |
top="0" bottom="0" right="0" left="0"> | |
<fx:Declarations> | |
<dao:ModuleDAO id="moduleSrv"/> |
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 | |
// I am using Symfony2 with it! | |
// Getting the connection | |
$conn = $this->getDoctrine()->getConnection(); | |
// Sets the SQL counter variable | |
$conn->exec("SET @I := 0"); |
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
// add the filter to your application module | |
angular.module('yourAppName', ['filters']); | |
/** | |
* Truncate Filter | |
* @Param string | |
* @Param int, default = 10 | |
* @Param string, default = "..." | |
* @return string | |
*/ |
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
1. start the application: | |
NODE_ENV=local node yourApplicationName.js --debug-brk | |
2. change the process pid to node-inspector | |
sudo kill -s USR1 pid_id | |
3. start node-inspector | |
node-inspector & |
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
# Source https://help.github.com/articles/dealing-with-line-endings | |
# Set default behaviour, in case users don't have core.autocrlf set. | |
* text=auto | |
# Explicitly declare text files we want to always be normalized and converted | |
# to native line endings on checkout. | |
*.c text | |
*.h text | |
# Declare files that will always have CRLF line endings on checkout. |
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
#!/bin/bash | |
# | |
# author: Daniel Gomes <[email protected]> | |
# twitter: @danielcgomes | |
# License: MIT | |
# Change the value of the $apacheuser to match your apache user | |
# This command must be run on the root of your Symfony2 project | |
# You should Symlink it to your /usr/bi | |
# |
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
ssh server_ip -l root | |
sudo -u git_user git config --system receive.denyDeleteCurrent warn | |
sudo -u git_user git config --global receive.denyDeleteCurrent warn |
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 | |
// require 'path/to/vendor/autoload.php'; | |
use Assetic\Asset\FileAsset; | |
$asset = new FileAsset('path/to/file.js'); | |
header('Content-Type: application/javasript'); | |
echo $asset->dump(); |
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 | |
//will output the content of the file and Parse anything inside <?php ?> tags | |
include 'example-2.php'; |
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 | |
$expression = 'here we got a number 23 % and so on'; | |
$pattern = '/(\d+ %)/'; | |
$replacement = '<b>$1</b>'; | |
echo preg_replace($pattern, $replacement, $expression); |
OlderNewer