Skip to content

Instantly share code, notes, and snippets.

View cupnoodle's full-sized avatar

soulchild cupnoodle

View GitHub Profile
{
"cmd": ["g++", "-Wall", "-Wextra", "${file}", "-o", "${file_path}/${file_base_name}",
"-I/usr/local/Cellar/opencv/2.4.9/include/opencv",
"-I/usr/local/Cellar/opencv/2.4.9/include",
"/usr/local/Cellar/opencv/2.4.9/lib/libopencv_calib3d.2.4.9.dylib",
"/usr/local/Cellar/opencv/2.4.9/lib/libopencv_contrib.2.4.dylib",
"/usr/local/Cellar/opencv/2.4.9/lib/libopencv_core.2.4.9.dylib",
"/usr/local/Cellar/opencv/2.4.9/lib/libopencv_features2d.2.4.9.dylib",
"/usr/local/Cellar/opencv/2.4.9/lib/libopencv_flann.2.4.9.dylib",
"/usr/local/Cellar/opencv/2.4.9/lib/libopencv_gpu.2.4.9.dylib",
@cupnoodle
cupnoodle / rails.gitignore
Last active August 29, 2015 14:13
Rails gitignore file
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
*.rbc
capybara-*.html
.rspec
/log
@cupnoodle
cupnoodle / Procfile
Created June 1, 2015 14:44
Procfile
web: node index.js
@cupnoodle
cupnoodle / index.js
Last active August 29, 2015 14:22
Node main app
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.listen(app.get('port'), function() {
console.log("Node app is running on port:" + app.get('port'))
})
@cupnoodle
cupnoodle / ViewController.m
Created June 14, 2015 09:52
iOS navigation controller swipe to go back
//put in root view of navigation controller
self.navigationController.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)self;
[self.navigationController.interactivePopGestureRecognizer setEnabled:YES];
@cupnoodle
cupnoodle / symlinkmamp.bash
Created July 4, 2015 18:53
Symlink for MAMP
ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
@cupnoodle
cupnoodle / knight.rb
Created August 24, 2015 05:48
Ruby script to solve Knight plight
#Slight modification from https://github.com/tkareine/knights_tour
#To generate solution for http://adityatj.github.io/knight/
#modified by soulchild
#original by tkareine (https://github.com/tkareine/knights_tour)
class KnightTour
def initialize(board_size_array, start_pos_array, forbidden_block_array = [])
@board_size = board_size_array
@cupnoodle
cupnoodle / database.yml
Created October 13, 2015 18:13
Use MAMP for Rails database
# MySQL. Versions 5.0+ are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
@cupnoodle
cupnoodle / Gemfile
Created January 24, 2016 08:29
Fix mysql gem problem in rails gemfile
# Fucking mysql gem
gem 'mysql2', '~> 0.3.18'
@cupnoodle
cupnoodle / nginx.conf
Created March 7, 2016 09:58
Nginx config 1
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}