This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-07-31 04:53:02,929 ERROR | |
WordCleaner.Log.LogError(:0) | |
message: License file not found: C:\Program Files (x86)\WordCleaner7Server\serverlicense.dat | |
2015-07-31 04:54:07,210 INFO | |
WordCleaner7Server.WordCleaner6ServerConsole.Main(:0) | |
message: Total WC run time (secs): 64.2813807 | |
2015-07-31 04:54:11,179 ERROR | |
WordCleaner.Log.LogError(:0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Session controller provides a token | |
#/controllers/api/sessions_controller.rb | |
class Api::SessionsController < Devise::SessionsController | |
before_filter :authenticate_user!, :except => [:create] | |
before_filter :ensure_params_exist, :except => [:destroy] | |
respond_to :json | |
def create | |
resource = User.find_for_database_authentication(:email => params[:user_login][:email]) | |
return invalid_login_attempt unless resource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ############################################################ | |
# Convert .jpeg files to a PDF | |
# 1. I'm using "Scan %d.jpeg"[1-17] because I had picture files | |
# with the following names: | |
# Scan 1.jpeg, Scan 2.jpeg ... Scan 17.jpeg | |
# 2. You can improve the output quality by increasing that | |
# 50 value | |
# ############################################################ | |
convert "Scan %d.jpeg"[1-17] -quality 50 my_pdf_file.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a quick and dirty script for copying files in AWS S3 to other buckets. | |
* This is written so it can work across AWS accounts. | |
* You can hack in code to apply work or logic to each file. | |
* | |
* For each file, it downloads locally to a tmp file and then starts uploading as soon as possible | |
* and deletes the file immediately when the upload is done. | |
* | |
* Best way to use: Spin up a micro in EC2, install node.js, | |
* create a directory and install the dependencies with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var edge = require('edge'); | |
var helloWorld = edge.func(function () {/* | |
async (input) => { | |
#r "System.Data.dll" | |
#r "C:\Program Files (x86)\DigitalOfficePro\HTML5PointSDK\Include\DigitalOfficePro.Html5PointSdk.dll" | |
using System; | |
using DigitalOfficePro.Html5PointSdk; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create an UPDATE folder | |
2. Inside UPDATE folder create settings.in and update.11.txt files | |
3. Edit settings.in with the below data: | |
{ | |
"current_password":"", | |
"token":"", | |
"wifi_ap":{ | |
"ssid":"MyCrazyGoProWifiName", | |
"password":"MySuperPassword" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
References: | |
http://blog.carbonfive.com/2012/02/27/supporting-cross-domain-ajax-in-rails-using-jsonp-and-cors/ | |
https://github.com/cyu/rack-cors | |
http://nelm.io/blog/2011/11/cors-with-sencha-touch/ | |
http://jessehowarth.com/2011/04/27/ajax-login-with-devise | |
============================================================================================================= | |
GEMFILE | |
============================================================================================================= | |
gem 'rack-cors', :require => 'rack/cors' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## JavaScript | |
## | |
syntax "JS" "\.js$" "\.sjs$" | |
# Reserved Keywords | |
color yellow "\b(instanceof|typeof|break|do|new|var|case|else|return|void|catch|finally|continue|for|switch|while|this|with|debugger|function|throw|default|if|try|delete|in)\b" | |
# Future Reserved Words | |
color brightblue "\b(class|enum|extends|super|import|const|export|implements|let|private|public|yield|static|interface|package|protected)\b" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fork heroku app to a staging one. | |
heroku fork -a project-dev project-staging | |
# Add new heroku app to git remote | |
git remote add project-staging [email protected]:project-staging.git | |
# Set specific enviroment | |
heroku config:set RACK_ENV=staging RAILS_ENV=staging --remote project-staging |