Skip to content

Instantly share code, notes, and snippets.

$('.communities .tools .btn_edit').click(function() {
$(this).parents('.community').
find('.manage,.edit,.delete').
hide().
end().
find('.edit').
show().
find('input').
focus().
end().
Can I create a gist when I'm logged out?
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
# 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
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
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.
require 'daemon_controller'
class SearchServer
delegate :start, :to => :controller
attr_reader :controller
def initialize
@controller = DaemonController.new(
:identifier => 'Sphinx search server',
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
location / {
...
index index.html index.htm;
...
}
should_redirect_to 'post_url(@post)'