To run bunch of Minitest tests in one go, without using Rake, use this command
$ ruby -e 'ARGV.each { |path| require "./#{path}" }' test/*.rb
To run bunch of Minitest tests in one go, without using Rake, use this command
$ ruby -e 'ARGV.each { |path| require "./#{path}" }' test/*.rb
# http://domain.com -> https://www.domain.com | |
# http://www.domain.com -> https://www.domain.com | |
server { | |
listen 80; | |
server_name domain.com www.domain.com; | |
return 301 https://www.domain.com$request_uri; | |
} | |
# https://domain.com -> https://www.domain.com | |
server { |
We want to create a function that will add numbers together when called in succession.
add(1)(2) == 3 // true
We also want to be able to continue to add numbers to our chain.
add(1)(2)(3) == 6 // true
I hereby claim:
To claim this, I am signing this object:
FROM base/archlinux:latest | |
# install dependencies | |
RUN pacman -Syu --noconfirm | |
RUN pacman --noconfirm -S base-devel yajl nodejs git openssh imagemagick python2 | |
RUN ln -s /usr/bin/python2 /usr/bin/python | |
# install yaourt | |
WORKDIR /tmp/scratch | |
RUN curl https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz | tar zx |
Debugging Ember apps used to be easy with
Ember.View.views['ember605']
as mentioned in official debugging guide in Ember documentation.
This, however, doesn't work with newer Ember versions and you should use this one instead
compass init rails . --using blueprint |
<% if @something %> | |
$("#showing_<%= @showing.id %>").html("<%= escape_javascript(render(:partial => 'item', :locals => { :showing => @showing, :create => false, :showing_confirmed => true})) %>"); | |
$("#showing_<%= @showing.id %>").effect("highlight"); | |
<% end %> | |
val = "pizdarija" | |
val.randomize | |
val.instance_eval do | |
def randomize | |
split(//).to_a.shuffle.join | |
end |
#include <stdio.h> | |
int main(){ | |
srand(time(NULL)); | |
int i = 0; | |
int random; | |
for (i=0;i < 10;i++){ | |
random = rand()%1000; | |
printf("%d\n",random); | |
} | |
return 0; |