Regex | Match |
---|---|
q(?=u) | q followed by a u |
q(?!u) | q not followed by a u |
(?<=u)q | q preceded by u |
(? |
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
alert(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
upstream app_server { | |
server unix:/path/to/app/tmp/sockets/unicorn.sock; | |
} | |
server { | |
server_name app.com; | |
root /path/to/app/public; | |
access_log /var/log/nginx/app.access.log main; |
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
# Sample verbose configuration file for Unicorn (not Rack) | |
# | |
# This configuration file documents many features of Unicorn | |
# that may not be needed for some applications. See | |
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb | |
# for a much simpler configuration file. | |
# | |
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
# documentation. |
I hereby claim:
- I am yesmeck on github.
- I am yesmeck (https://keybase.io/yesmeck) on keybase.
- I have a public key whose fingerprint is 26A9 0B54 5590 9D71 AC36 90B6 E3B5 FC04 0B5C 10B3
To claim this, I am signing this object:
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.directive('ngEnter', function() { | |
return function(scope, element, attrs) { | |
element.bind("keydown keypress", function(event) { | |
if(event.which === 13) { | |
scope.$apply(function(){ | |
scope.$eval(attrs.ngEnter); | |
}); | |
event.preventDefault(); | |
} |
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 | |
echo 'hello world'; |
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 | |
max_file_count=15 | |
file_count=$(ls mysql-* | wc -l) | |
if [ $file_count -gt $max_file_count ] | |
then | |
rm mysql-* | |
fi |
OlderNewer