Remove sudo password request when deploying
In terminal: visudo
# Cmnd alias specification Cmnd_Alias HTTPD = /usr/local/sbin/apachectl, /etc/init.d/apache2 # User privilege specification [user] ALL = NOPASSWD: HTTPD
TextSnippets
2827 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
What next?
1. Bookmark us with del.icio.us or Digg Us!
2. Subscribe to this site's RSS feed
3. Browse the site.
4. Post your own code snippets to the site!
accelerator actionscript administration ajax apache applescript backup bash cli css delphi dns dom effect email expressionengine fastcgi flash freebsd html image java javascript js lighttpd linux mac mysql osx perl php prototype python rails recipe regex ruby rubyonrails shell sql ssh subversion svn sysadmin terminal textdrive textpattern tiger ubuntu unix
ruby
Install postgres gem on Mac OS X 10.5 (Leopard)
Suppress Warnings in Ruby
Add missing empty directories in .svn
ChatGPT Plugins development company
rails
Subversion Configuration Script for Your Rails A..
Install plugin on rails app
https://immediate-zenx.app/
Ubuntu 7.10: bootstrap a Ruby on Rails stack
osx
Install postgres gem on Mac OS X 10.5 (Leopard)
Compile ClamAV from source on Mac OS X
Gas Ertrag
Run ClamAV from a system service agent account
Bitcoin Bank
php
Installs pecl memcache php5 extension on a Joyen..
关于MYSQL的用法
Test php mysql pdo_mysql
shell
how to get process start time
Compile ClamAV from source on Mac OS X
rename many files at once
Tesler trading
javascript
xpath helper function
jQuery namespaced event binding/unbinding
jQuery and Rails' respond_to
https://azucarbet.com/
mysql
change mysql user password
move column in mysql
关于MYSQL的用法
bash
Compile ClamAV from source on Mac OS X
rename many files at once
add apache to users group
mac
Compile ClamAV from source on Mac OS X
Run ClamAV from a system service agent account
Creating & deleting system service agent account..
linux
activate root in ubuntu after install
running scheduled programs in linux
Rename files by reordering existing data (regula..
lighttpd
Tomcat connector for lighttpd:
Lighttpd redirect www to no www
lighttpd launchd script for Leopard
ssh
ssh-copy-id for automated pubkey append
ssh remote systems
Local SOCKS Proxy for Safari
accelerator (12)
actionscript (18)
administration (32)
ajax (25)
apache (35)
applescript (15)
backup (12)
bash (63)
cli (23)
css (44)
delphi (21)
dns (15)
dom (17)
effect (12)
email (19)
expressionengine (25)
fastcgi (14)
flash (17)
freebsd (12)
html (41)
image (23)
java (15)
javascript (104)
js (11)
lighttpd (46)
linux (53)
mac (56)
mysql (64)
osx (110)
perl (19)
php (110)
prototype (15)
python (21)
rails (125)
recipe (16)
regex (26)
ruby (130)
rubyonrails (19)
shell (106)
sql (32)
ssh (45)
subversion (24)
svn (35)
sysadmin (14)
terminal (27)
textdrive (15)
textpattern (17)
tiger (11)
ubuntu (13)
unix (44)
# Cmnd alias specification Cmnd_Alias HTTPD = /usr/local/sbin/apachectl, /etc/init.d/apache2 # User privilege specification [user] ALL = NOPASSWD: HTTPD
mysqladmin -u [user] -h localhost -p password '[new_password]'
ALTER TABLE TableName MODIFY ColumnName ColumnType NULL/NOT NULL AFTER OtherColumnName;
=========== WARNING =========== You are building this extension on OS X without setting the ARCHFLAGS environment variable, and PostgreSQL does not appear to have been built as a universal binary. If you are seeing this message, that means that the build will probably fail. Try setting the environment variable ARCHFLAGS to '-arch i386' before building. For example: (in bash) $ export ARCHFLAGS='-arch i386' (in tcsh) $ setenv ARCHFLAGS '-arch i386' Then try building again. ===================================
sudo env ARCHFLAGS="-arch i386" gem install postgres
#!/bin/sh # Installs pecl memcache php5 extension on a Joyent Accelerator # # $Id$ VERSION=2.2.3 TEMPDIR=`/usr/bin/mktemp` cd ${TEMPDIR} /usr/sfw/bin/wget http://pecl.php.net/get/memcache-${VERSION}.tgz /opt/local/bin/tar -zxvf memcache-${VERSION}.tgz cd memcache-${VERSION} /opt/local/bin/phpize ./configure /usr/bin/make /usr/bin/make install /opt/local/bin/gsed -i"" "s/;extension=memcache.so/extension=memcache.so/" /opt/local/etc/php.ini
./configure --prefix=/opt/local/nginx --with-http_ssl_module --with-openssl=../openssl-0.9.8e --with-cc-opt="-m64 -I/usr/local/include -I/usr/local/ssl/include" --with-ld-opt="-L/lib/64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64 -R/lib/64 -L/usr/local/ssl/lib -m64 -L/usr/local/lib -R/usr/local/lib" --with-http_flv_module
#!/usr/bin/env ruby # Kernel#with_warnings_suppressed - Supresses warnings in a given block. # Require this file to use it or run it directly to perform a self-test. # # Note: The test probably won't work on Windows (haven't tried it, but # IO.popen likely uses fork) # # Author:: Rob Pitt # Copyright:: Copyright (c) 2008 Rob Pitt # License:: Free to use and modify so long as credit to previous author(s) is left in place. # module Kernel # Suppresses warnings within a given block. def with_warnings_suppressed saved_verbosity = $-v $-v = nil yield ensure $-v = saved_verbosity end end #-- # Kernel#with_warnings_suppressed self-test. if $0 == __FILE__ # Go here for reference on rspec: http://rspec.info/examples.html require 'rubygems' require 'spec' def warning_generator IO.popen( '-' ) do |io| if io # parent return io.read else #child $stderr.reopen( $stdout ) Object.const_set( 'MONKEY', 1 ) Object.const_set( 'MONKEY', 2 ) end end end describe Kernel do it "should supress warnings" do with_warnings_suppressed do warning_generator end.should == "" end it "should restore the previous verbosity state when it's finished" do with_warnings_suppressed do warning_generator end.should == "" warning_generator.should match( /warning: already initialized constant MONKEY/ ) end end end #++
// 我很好..
//百度中国,中国是一个伟大的国家
curl http://www.infrant.com/beta/raidar/RAIDar.wdgt -o RAIDar.wdgt.zip curl -O http://speedbinge.com/code/RAIDar_bt.patch unzip RAIDar.wdgt.zip patch -p0 < RAIDar_bt.patch open RAIDar.wdgt