Skip to content

Instantly share code, notes, and snippets.

View letsspeak's full-sized avatar
🥺
finding remote jobs

Masatsugu Omiya letsspeak

🥺
finding remote jobs
View GitHub Profile
@letsspeak
letsspeak / mysql cli
Last active December 15, 2015 01:49
mysql creating fuelphp user APPLICATION_NAME is your application name
mysql> select * INTO OUTFILE 'dump.txt' from テーブル名;
mysql> LOAD DATA INFILE 'dump.txt' INTO TABLE テーブル名;
@letsspeak
letsspeak / mysqlbackup.php
Created March 15, 2013 19:54
FuelPHP MySQL backup script
<?php
namespace Fuel\Tasks;
class MySQLBackup
{
public static function system_ex($cmd, $stdin = "")
{
$descriptorspec = array(
0 => array("pipe", "r"),
@letsspeak
letsspeak / database.yml
Created October 30, 2012 17:41
Redmine on unicorn on nginx with mysql, my configuration files.
# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: ******
@letsspeak
letsspeak / gist:3950545
Created October 25, 2012 05:26
NSUInteger(unsigned int) subtraction results
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSUInteger a = 5, b = 10;
NSInteger c = 8;
NSLog(@" a - b = %d", a - b);
// a - b = -5
@letsspeak
letsspeak / sync-charag
Created July 30, 2012 00:35
immediately rsync when the file in specific directory was written by vim (final edition)
#!/bin/sh
rsync -av -e "ssh -p XXXX" $1 XXXX@charag.jp:$2