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
aptitude update; | |
aptitude upgrade; | |
aptitude install apache2 mysql-server php5 php5-mysql; | |
y; | |
clear; | |
cd /var/www; |
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
ssh root@[yourServerIPAddress] -p | |
[your root password] |
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
#add line to sources.list inside /etc/apt/sources.list | |
sudo vim /etc/apt/sources.list | |
i | |
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen | |
ESC | |
:wq | |
# update "/etc/apt/sources.list" | |
sudo apt-get update |
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
openAuthoriseWindow = (url) -> | |
waitForPin = -> | |
if wnd.closed | |
pin = prompt("Please enter your PIN", "") | |
oauth.setVerifier pin | |
oauth.fetchAccessToken getSomeData, failureHandler | |
else | |
setTimeout waitForPin, 100 | |
wnd = window.open(url, "authorise") | |
setTimeout waitForPin, 100 |
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
//request permission | |
function askPermission(){ | |
webkitNotifications.requestPermission(testNotification); | |
} | |
//send notification | |
function testNotification(){ | |
var notification = | |
webkitNotifications.createNotification('IMAGE','TITLE','BODY'); | |
notification.show(); |
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
$('#result').load('ajax/test.html', function() { | |
alert('Load was performed.'); | |
}); |
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
backspace 8 | |
tab 9 | |
enter 13 | |
shift 16 | |
ctrl 17 | |
alt 18 | |
pause/break 19 | |
caps lock 20 | |
escape 27 | |
page up 33 |
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
function focusImage(canvas, context, imageObj, pixelation){ | |
var sourceWidth = imageObj.width; | |
var sourceHeight = imageObj.height; | |
var sourceX = canvas.width / 2 - sourceWidth / 2; | |
var sourceY = canvas.height / 2 - sourceHeight / 2; | |
var destX = sourceX; | |
var destY = sourceY; | |
var imageData = context.getImageData(sourceX, sourceY, | |
sourceWidth, sourceHeight); | |
var data = imageData.data; |
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
Step # 1 : Stop mysql service | |
/etc/init.d/mysql stop | |
Step # 2: Start to MySQL server without password: | |
mysqld_safe --skip-grant-tables & | |
Step # 3: Connect to mysql server using mysql client: | |
mysql -u root | |
Step # 4: Setup new MySQL root user password |
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
#COMMANDS | |
cd /etc/apache2/mods-enabled | |
touch rewrite.load | |
vi rewrite.load | |
#INSERT CODE | |
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so | |
#EDIT IN | |
/etc/apache2/sites-available/default |
OlderNewer