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 | |
$json = array( | |
'values' => array( | |
0 => array( | |
'field' => 'id1', | |
'value' => 895 | |
), | |
1 => array( | |
'field' => 'id2', |
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
if Rails.env.test? | |
module ActionDispatch | |
module Routing | |
module UrlFor | |
alias_method :original_url_options, :url_options | |
def url_options | |
if self.respond_to? :request | |
original_url_options.merge({:host => request.host, :port => request.port}) | |
else |
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 | |
# | |
# Sets-up ACL for current + www-data users to allow writing to folder by both and deleting files created by each other. | |
# This simplifies some Symfony2 dev tasks | |
# | |
# *** NOT TO BE USED IN PRODUCTION SERVERS IN ANY WAY ***. | |
# | |
if [ -z "$1" ]; then |
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 | |
use Symfony\Component\HttpKernel\Kernel; | |
class AppKernel extends Kernel | |
{ | |
/* ... everything else is skipped ... */ | |
public function getCacheDir() |
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
# Say project domain in PhpStorm is configured as example.org and your VM IP is xxx.xxx.xxx.yyy: | |
PHP_IDE_CONFIG=serverName=example.org php -dxdebug.remote_autostart=1 -dxdebug.remote_host=xxx.xxx.xxx.1 -f ./app/console.php -- console:args --go-here | |
# with xdebug log (useful for troubleshooting) | |
PHP_IDE_CONFIG=serverName=example.org php -dxdebug.remote_log="./xdebug.log" -dxdebug.remote_autostart=1 -dxdebug.remote_host=xxx.xxx.xxx.1 -f ./app/console.php -- console:args --go-here |
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
app.run(function($rootScope) { | |
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) { | |
console.group('$stateChangeStart ' + fromState.name + ' => ' + toState.name); | |
console.group('from:'); | |
console.log(fromState); | |
console.log(fromParams); | |
console.groupEnd(); |
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 | |
# Strips colors/escape sequences from output | |
# | |
# Usage: annoying-color-producing-tool | nocol | |
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" |
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
<html> | |
<head> | |
<link rel="stylesheet" href="style.css" type="text/css"> | |
<title>RefME Cite Button</title> | |
<script src="https://widget.refme-dev.com/scripts/refme-cite.js"></script> | |
</head> | |
<body> | |
<section> | |
<div class="col"> | |
<div id="citation-button"></div> |
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
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
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
backend default { | |
.host = "127.0.0.2"; | |
.port = "80"; | |
} | |
sub vcl_recv { | |
set req.backend = default; | |
return(lookup); | |
} |
OlderNewer