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 webpack = require('webpack'), | |
path = require('path'); | |
module.exports = function(env){ | |
env = env || {}; | |
var isProd = env.isProd || false; | |
var config = { | |
context: path.resolve("./src"), | |
entry: { |
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 istanbul = require('istanbul'), | |
gulp = require('gulp'), | |
istanbul = require('gulp-istanbul'); | |
gulp.task('js', function() { | |
return gulp.src('js') | |
.pipe(istanbul({ | |
includeUntested: true, | |
coverageVariable: '__coverage__' | |
})) |
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
rare run: from rares clustered to rares clustered in two runs each way - with a cobra mk3 and about 24-28 cargo slots. | |
based on clusters seen in this : https://www.elitedangeroustrader.co.uk/rares-systems-3d-map/ | |
and a mid-point route from : https://cmdr.club/routes/ | |
we need a cluster of rares to fill the ship | |
we need 150K or so LY between the clusters of rares. |
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
package main | |
/* | |
#cgo CFLAGS: -x objective-c | |
#cgo LDFLAGS: -framework Cocoa | |
#import <Cocoa/Cocoa.h> | |
int | |
StartApp(void) { | |
[NSAutoreleasePool new]; |
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
module ActionView | |
class Renderer | |
def render(context, options) | |
Rails.logger.info options.inspect | |
result = if options.key?(:partial) | |
render_partial(context, options) | |
else | |
render_template(context, options) | |
end |
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
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156) | |
# | |
# ## Advisory | |
# | |
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion | |
# | |
# ## Caveats | |
# |
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
<script type="text/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</script> |
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
class ThingDecorator < SimpleDelegator | |
def initialize(klass) | |
@model = klass | |
super(klass) | |
end | |
def class | |
@model.class | |
end |
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
echo precompile assets for production | |
rvmsudo RAILS_ENV=production bundle exec rake assets:precompile | |
echo restart unicorn | |
sudo kill `cat unicorn.pid` | |
echo start unicorn as production | |
rvmsudo unicorn_rails -c config/unicorn.rb -D --env production |
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
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
NewerOlder