-
Open the Terminal
-
Use
mysqldumpto backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql -
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
| var React = require('react'); | |
| var cx = require('classnames'); | |
| var vjs = require('video.js'); | |
| var _forEach = require('lodash/collection/forEach'); | |
| var _debounce = require('lodash/function/debounce'); | |
| var _defaults = require('lodash/object/defaults'); | |
| var DEFAULT_HEIGHT = 800; | |
| var DEFAULT_WIDTH = 600; | |
| var DEFAULT_ASPECT_RATIO = (9 / 16); |
SSH into Root
$ ssh root@123.123.123.123
Change Root Password
| require "uri" | |
| require "net/http" | |
| require "nokogiri" | |
| require "logger" | |
| name_final = Array.new | |
| uri = URI.parse("http://resultsarchives.nic.in/cbseresults/cbseresults2004/class12/cbse12.asp") | |
| req = Net::HTTP::Post.new(uri.path, { | |
| 'Referer' => "http://resultsarchives.nic.in/cbseresults/cbseresults2004/class12/cbse12.htm", |
| Using gem aws-sdk for a ror application for uploading images to s3 | |
| Uploading images to a fixed bucket with different folders for each object or application. | |
| The s3 keeps a limitation on the number of buckets creattion whereas there is no | |
| limitation for content inside a bucket. | |
| This code will upload image for a user to s3 using aws-sdk gem. The bucket and the image uploaded are made public | |
| so that the images uploaded are directly accessible. The input it takes is the image complete path | |
| where it is present, folder in which it should be uploaded and user_id for whom it should | |
| be uploaded. |
If you need to change the hostname that Sendmail announces itself as, just add the following to sendmail.mc:
define(`confDOMAIN_NAME', `mail.yourdomain.com')dnl
For example-: Your domain name is www.xyz.com, then
define(`confDOMAIN_NAME', `www.xyz.com')dnl
| # Apache configuration file | |
| # httpd.apache.org/docs/2.2/mod/quickreference.html | |
| # Note .htaccess files are an overhead, this logic should be in your Apache | |
| # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
| # Techniques in here adapted from all over, including: | |
| # Kroc Camen: camendesign.com/.htaccess | |
| # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
| # Sample .htaccess file of CMS MODx: modxcms.com | |
| # This is the free sample of .htaccess from 6GO s.r.l. | |
| # @author Claudio Ludovico Panetta (@Ludo237) |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
| <?php | |
| function http_file_get_contents( $url ) { | |
| $response = file_get_contents( $url ); | |
| return $response; | |
| } | |
| ?> |