Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Fabryz
Fabryz / mysqldump-scp-mysql
Created June 30, 2016 09:31 — forked from magemonkey/mysqldump-scp-mysql
Copying a Magento Database from one server to another using mysqldump / scp / mysql
#1)
#SSH to the server you want to copy the database from
#[ssh template] - replace [IP] with actual server IP
ssh root@[IP]
#2)
#Find the database credentials from the database that you are copying in app/etc/local.xml
#[nano template]
nano [path to web root]/app/etc/local.xml
#In this file look for <connection> node and find the nodes <username> <password> <dbname>
SSH_HOST1=IP1
SSH_HOST2=IP2
SSH_HOST3=IP3
SSH_HOST4=IP3
SSH_USER=mondiali.prod
WEB_DIR=/Storage/mondiali.prod/htdocs/
all:
php artisan
@Fabryz
Fabryz / gist:8183654
Created December 30, 2013 15:47
1- Open %localappdata%/Overwolf/GameList.#######.xml" with a text editor 2- Paste the text at the end of the file, before the "</ArrayOfGameInfo>"
<GameInfo>
<ID>252490</ID>
<GameTitle>PlayRust</GameTitle>
<ProcessNames>
<string>rust.exe</string>
</ProcessNames>
<LuancherNames>
<string>Steam.exe</string>
</LuancherNames>
<GameRenderers>D3D9</GameRenderers>
var events = require('events');
module.exports = new events.EventEmitter();
@Fabryz
Fabryz / README.md
Created October 12, 2013 11:59 — forked from nikcub/README.md
@Fabryz
Fabryz / node-pilite.js
Last active December 20, 2015 20:18
Control the Pi Lite with Node.js $ npm install serialport $ node server.js
/*
* Description: Control the Pi Lite via Node.js
* Author: Fabrizio Codello (fabryz.com)
*
* TODO: Check if writing out of bounds
*/
var SerialPort = require("serialport").SerialPort;
// http://openmicros.org/index.php/articles/94-ciseco-product-documentation/raspberry-pi/280#Using the Pi-Lite pre-loaded software
var http = require('http');
var xmldoc = require('xmldoc');
var SerialPort = require("serialport").SerialPort;
function parseXML(data) {
var document = new xmldoc.XmlDocument(data);
var symbol = document.valueWithPath("Data.Symbol");
var price = document.valueWithPath("Data.LastPrice");
@Fabryz
Fabryz / gist:6186690
Created August 8, 2013 17:22
Simple Node.js script to write text on the Pi Lite
var SerialPort = require("serialport").SerialPort;
var serialPort = new SerialPort("/dev/ttyAMA0", {
baudrate: 9600
}, false);
serialPort.open(function () {
console.log('Connected to Pi Lite');
var text = "Hello World";
client.keys("*", function(err, keys) {
if (err) throw err;
console.log(keys); // OK
var response = [];
for (var i = 0; i < keys.length; i++) {
client.hget(keys[i], "count", function(err, value) {
if (err) throw err;
@Fabryz
Fabryz / gist:5795660
Created June 17, 2013 09:10
npm install redis error
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'redis', '--save' ]
2 info using npm@1.2.21
3 info using node@v0.8.23
4 verbose read json /Applications/MAMP/htdocs/node-redis-test/package.json
5 warn package.json node-redis-test@0.0.0 No repository field.
6 warn package.json node-redis-test@0.0.0 No readme data.
7 verbose read json /Applications/MAMP/htdocs/node-redis-test/node_modules/redis/package.json
8 verbose from cache /Applications/MAMP/htdocs/node-redis-test/package.json
9 verbose readDependencies using package.json deps