- Install Ruby ~> 2.6
gem install rspec
- Open an IRB session with
irb -r ./linked_list.rb
list = LinkedList.new
package main | |
import ( | |
"fmt" | |
) | |
var a1 = [3]int{1, 2, 3} | |
var s1 = a1[0:3] | |
func main() { |
# A prime is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers | |
def prime?(int) | |
# A prime is a natural number greater than 1... | |
return false if int < 2 | |
# Is _int_ evenly divisible by any number 2 -> int-1? | |
(2..(int - 1)).each do |divisor| | |
return false if int % divisor == 0 | |
end | |
return true |
Other than the default Panini pieces, you will also need to make sure that lodash
is included as a devDependencies in your package.json
Tag a section of text as translatable. The section will be replaced with a set of if/elseif/else Merge Tags for each translation provided, otherwise only the wrapped content is displayed.
Tempfile
s since they would be GC'd too quickly)1>>stdout_tempfile_path 2>>stderr_tempfile_path
{original commands with io redirection &&'d together}; bundle exec rake cleanup_task
# RUBY / RUBY ON RAILS COMMANDS | |
alias bexec='bundle exec' | |
alias rails_mv="bexec rails -v | sed 's/Rails \([0-9]\).*/\1/g'" | |
# Alias the rake command to Spring binstubs or fallback to "bundle exec" | |
# http://goo.gl/HkhHAf, http://goo.gl/STtIvF | |
function brake { | |
if [ -f bin/rake ] | |
then | |
bin/rake "$@" | |
else |
#!/bin/sh | |
# GENERAL COMMANDS | |
alias l='ls -AHhlp' | |
alias c='clear' | |
alias cx='chmod +x' | |
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
alias reload='source ~/.bash_profile' | |
alias release='xattr -d com.apple.quarantine' | |
alias flushdns='sudo discoveryutil udnsflushcaches' |
<html> | |
<body> | |
<section class="left"> | |
<article id="customers"> | |
<h2>New Customers</h2> | |
<table class="data"> | |
<thead> | |
<tr> | |
<th>ID</th> | |
<th>First Name</th> |
My notes from the Meet Chef course at http://pluralsight.com/training/Courses/TableOfContents/meet-chef
Chef is a Ruby framework for automating, reusing and documenting server configuration. It's like Unit tests for your servers.
The following will prevent all future AJAX requests from being cached, regardless of which jQuery method you use (
$.ajaxSetup({ cache: false });
Source: http://stackoverflow.com/a/735101/83743
However, jQuery's AJAX object will follow redirects, so even if you disable caching globally the "_={timestamp}"
parameter that jQuery adds to bust the browser's cache may not be forwarded with the redirect. In that case, your request can still be cached by the browser. The solution is to either make sure that special param is passed along with redirects, or to send the appropriate cache-busting response headers from the server-side code for those requests.
Reference: http://api.jquery.com/jQuery.ajax/