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
$('.communities .tools .btn_edit').click(function() { | |
$(this).parents('.community'). | |
find('.manage,.edit,.delete'). | |
hide(). | |
end(). | |
find('.edit'). | |
show(). | |
find('input'). | |
focus(). | |
end(). |
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
Can I create a gist when I'm logged out? |
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
root@ubuntu:/var/log/apache2# cat access.log | awk '/([\.\d]+)/ {print $1}'|sort | sort -rn | head -n50 | |
222.70.36.137 | |
222.166.160.93 | |
222.166.160.35 | |
222.166.160.245 | |
222.166.160.178 | |
222.166.160.163 | |
222.166.160.157 | |
222.166.160.129 | |
222.166.160.121 |
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
# Remove all rules and chains | |
iptables -F | |
iptables -X | |
# first set the default behaviour => accept connections | |
iptables -P INPUT ACCEPT | |
iptables -P OUTPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
# Create 2 chains, it allows to write a clean script |
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
class Process | |
def initialize(pid) | |
@pid = pid.to_i | |
end | |
# Return true if this process is running, false otherwise | |
def exists? | |
system("kill -0 #{@pid} &> /dev/null") | |
end | |
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
I finally get Quebec. All these years, I've been living here wondering wtf was | |
up with the whole language thing. I mean - it's just a language, right? A tool | |
for expressing yourself. Who really cares? | |
But, then today, it hit me. If I was told that a whole bunch of C# people were | |
going to infiltrate my company. And I wasn't going to be able to write ruby | |
anymore. I'd freak out and start implementing draconian corporate policies to | |
keep them out. And get police to come in with guns and threaten them. |
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
require 'daemon_controller' | |
class SearchServer | |
delegate :start, :to => :controller | |
attr_reader :controller | |
def initialize | |
@controller = DaemonController.new( | |
:identifier => 'Sphinx search server', |
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
updating 'refs/heads/master' | |
from 54995a64e5238b9fe59406b7234d4a188be36726 | |
to eace7ae14748ea2f34bd78a622af425c185d0282 | |
Also local refs/remotes/origin/master | |
Generating pack... | |
Done counting 5 objects. | |
Deltifying 5 objects... | |
100% (5/5) done | |
Writing 5 objects... | |
100% (5/5) done |
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
location / { | |
... | |
index index.html index.htm; | |
... | |
} |
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
should_redirect_to 'post_url(@post)' |
OlderNewer