A few notes:
- All commands should be run as root unless specified otherwise.
- Commands that sould be run locally have a
local$
prefix.
Tutorials for running live Kali on OSX often require you have networking on your laptop to apt
install the drivers, but without an ethernet adapter you're not going to be able to do that, so this tutorial will cover a method of doing this manually, using another thumbdrive or external data source.
Download the appropriate Kali Linux .iso
I used a 64 bit .iso
image, downloaded via HTTP.
var a = ["sdfdf", "http://oooooolol"], | |
handleNetErr = function(e) { return e }; | |
Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr)) | |
.then(function(sdf, invalid) { | |
console.log(sdf, invalid) // [Response, TypeError] | |
}) | |
.catch(function(err) { | |
console.log(err); | |
}) |
(a moderately, well, shameless rework of Holden Karau's "Scala - Crash Course")
Scala is a multi-paradigm high-level language for the JVM.
It offers the ability to use both Object-oriented & Functional approaches.
Scala is statically typed. Type inference eliminates the need for more explicit type declarations.
<?php | |
require_once "vendor/autoload.php"; | |
use Symfony\Component\Console\Application; | |
use Illuminate\Database\Console\Migrations; | |
use Pimple\Container; | |
$container = new Container(); | |
$container['migration-table'] = 'migration'; |
#!/usr/bin/env ruby | |
# Colorize string | |
class String | |
def colorize(color_code) | |
"\e[#{color_code}m#{self}\e[0m" | |
end | |
end | |
class Colors |
function getBackgroundColor(rangeSpecification) { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
return sheet.getRange(rangeSpecification).getBackground(); | |
} | |
function getForegroundColor(rangeSpecification) { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
return sheet.getRange(rangeSpecification).getFontColor(); | |
} |
#!/bin/bash | |
# | |
# The homebrew formula of kong has a lot of version incompatibilities. So | |
# we install kong directly from Luarocks. | |
# | |
# Kong only works with Cassandra 2.1.x/2.2.x, the latest brew formula for | |
# cassandra is 3.x. We need to tap homebrew/versions and install cassandra22 | |
# instead. | |
# |
<?php | |
// From: http://stackoverflow.com/questions/1374753/passing-base64-encoded-strings-in-url | |
function base64_url_encode($input) { | |
return strtr(base64_encode($input), '+/=', '-_,'); | |
} | |
function base64_url_decode($input) { | |
return base64_decode(strtr($input, '-_,', '+/=')); | |
} |