Skip to content

Instantly share code, notes, and snippets.

View noppolp's full-sized avatar

noppolp noppolp

View GitHub Profile
SET @@global.time_zone='+00:00';
SET time_zone = "+00:00";
SET @@session.time_zone = "+00:00";
@noppolp
noppolp / MessageBox.cs
Last active November 5, 2015 15:51 — forked from CH3COOH/MessageBox.cs
MessageBox.Show for Xamarin.iOS
using System;
using System.Drawing;
using UIKit;
using Foundation;
using System.Collections.Generic;
namespace UIKit
{
public enum MessageBoxResult
{
To expose MySQL to anything other than localhost you will have to have the following line uncommented in /etc/mysql/my.cnf and assigned to your computers IP address and not loopback
#Replace xxx with your IP Address
bind-address = xxx.xxx.xxx.xxx
Or add a bind-address = 0.0.0.0 if you don't want to specify the IP
Then stop and restart MySQL with the new my.cnf entry. Once running go to the terminal and enter the following command.
lsof -i -P | grep :3306
That should come back something like this with your actual IP in the xxx's
chmod g+s <directory> //set gid
setfacl -d -m g::rwx /<directory> //set group to rwx default
setfacl -d -m o::rx /<directory> //set other
Next we can verify:
getfacl /<directory>
Output:
# file: ../<directory>/
# owner: <user>
@noppolp
noppolp / cppappwithsharedlib
Last active August 29, 2015 14:22
Run c++ app with shared lib script
#!/bin/sh
export LD_LIBRARY_PATH=/home/deploy/olivdvr/lib:/home/deploy/olivdvr/lib/HCNetSDKCom:$LD_LIBRARY_PATH
exec /home/deploy/olivdvr/lib/OLIV_CaptureBox $*
# create link
# sudo ln -s /home/deploy/run_olivdvr /usr/local/bin
@noppolp
noppolp / qt-ubuntu
Created May 28, 2015 06:52
QT on ubuntu compiler install
sudo apt-get install git cmake g++
sudo apt-get install libqt4-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtquick1-5-dev qtscript5-dev libqt5xmlpatterns5-dev libqt5svg5-dev libqt5webkit5-dev
link:
https://musescore.org/en/developers-handbook/compilation/compile-instructions-ubuntu-14.10-git
sudo apt-add-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg
; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Default Value: no
catch_workers_output = yes
log here:
sudo cat /var/log/upstart/php5-fpm.log
up vote
25
down vote
accepted
After more research it seems like another (possibly better way) to answer this would be to setup the www folder like so.
sudo usermod -a -G developer user1 (add each user to developer group)
sudo chgrp -R developer /var/www/site.com/ so that developers can work in there
sudo chmod -R 2774 /var/www/site.com/ so that only developers can create/edit files (other/world can read)
@noppolp
noppolp / oliv-rails-and-php-nginx
Created May 26, 2015 09:33
Oliv Rails and PHP nginx config
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#