Skip to content

Instantly share code, notes, and snippets.

View wallace57's full-sized avatar

Tinh Nguyen wallace57

View GitHub Profile
Haloasia test Gist
Yoshi test
#!/bin/bash
# copy this file to /usr/sbin
# if you have other hosts entries that you would not like to lose, make sure they get added to the hosts.mamp.bak file
cat /etc/hosts.mamp.bak > /etc/hosts
echo 'clean!'
<?php
// Put your device token here (without spaces):
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Put your private key's passphrase here:
$passphrase = 'xxxxxxx';
// Put your alert message here:
$message = 'A push notification has been sent!';
@wallace57
wallace57 / migrate.sh
Last active August 29, 2015 14:27 — forked from tobi-pb/migrate.sh
Upgrade MAMP to Mysql 5.6
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.tar.gz
tar xfvz mysql-5.6*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "creating backup"
@wallace57
wallace57 / gist:8d5451cbe10adf95f293
Last active August 30, 2015 03:47 — forked from panuta/gist:3075882
How to setup Django server with virtualenv on Ubuntu Server 12.04

Fix locale problem

Run the following command

$ update-locale LC_ALL="en_US.UTF-8"

If it failed, you will need to add the following to /var/lib/locales/supported.d/local file

en_US.UTF-8 UTF-8

@wallace57
wallace57 / README.md
Last active August 30, 2015 13:47 — forked from rderoldan1/README.md
Install libffi-devel

The problem

While I was configuring Ruby on Rails in a Red Hat (CentOS) with RVM I found a problem with the library libffi-devel because the package wasn't available via yum install, after search for a couple of days I found this solution.

Add rpmforge as a repository

  1. Create a repo file in /etc/yum.repos.d/rpmforge.repo, you need to be an admin
  2. Copy the following text.
@wallace57
wallace57 / 00. tutorial.md
Created October 19, 2015 09:36 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@wallace57
wallace57 / Django Haystack Solr Setup
Created October 22, 2015 15:45 — forked from stvbdn/Django Haystack Solr Setup
Django + Haystack + Solr Installation/Setup
### Solr Install ###
Install pysolr and django-haystack and set up django-haystack. Setup for haystack is pretty straight forward:
https://django-haystack.readthedocs.org/en/v1.2.7/tutorial.html
Make sure you follow the haystack instructions for the correct version of haystack that you installed,
as some of the setting variables are different depending on the version.
# SSH into the server that you want to install Solr on
@wallace57
wallace57 / action_links.html
Created January 9, 2016 15:22 — forked from niraj-shah/action_links.html
Adding action links to posts using JavaScript and the FB.UI Feed dialog.