type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
<html> | |
<head> | |
<script src="https://www.gstatic.com/firebasejs/3.0.0/firebase.js"></script> | |
<title>ZeroToApp</title> | |
<style> | |
#messages { width: 40em; border: 1px solid grey; min-height: 20em; } | |
#messages img { max-width: 240px; max-height: 160px; display: block; } | |
#header { position: fixed; top: 0; background-color: white; } | |
.push { margin-bottom: 2em; } | |
@keyframes yellow-fade { 0% {background: #f2f2b8;} 100% {background: none;} } |
/// | |
// AppDelegate.swift | |
// ZeroToApp | |
// | |
import UIKit | |
import Firebase | |
import FBSDKCoreKit | |
@UIApplicationMain |
NOTE: This Gist concerns the old Linode KVM Beta, NOT the current Manager. Please see linode/docs#501 (comment) for more up-to-date instructions.
You will need:
On the KVM source, run the following to create a VM:
import javax.crypto.*; | |
import javax.crypto.spec.GCMParameterSpec; | |
import java.nio.ByteBuffer; | |
import java.security.SecureRandom; | |
import java.util.Arrays; | |
public class AESGCMUpdateAAD2 { | |
// AES-GCM parameters | |
public static final int AES_KEY_SIZE = 128; // in bits |
public class HelperResource { | |
public static void setRequestOptions(ContainerRequestContext requestContext, RequestOptions requestOptions) { | |
requestContext.setProperty("requestOptions", requestOptions); | |
} | |
public static boolean isBodyRequested(ContainerRequestContext requestContext) { | |
// Do not return a body for head methods, but we might want to calculate paging / headers, etc. | |
// For now this is getting rewritten as GET by Jersey, but it might be changed later: | |
// https://java.net/jira/browse/JERSEY-2460 |
# Basically the nginx configuration I use at konklone.com. | |
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
# | |
# To provide feedback, please tweet at @konklone or email [email protected]. | |
# Comments on gists don't notify the author. | |
# | |
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
server { |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.Servlet; | |
import javax.servlet.ServletConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletRequest; |
# Major US Cities with DMA Codes | |
major_cities = [ | |
{'city': 'Ada', 'dma_code': 657, 'latitude': 34.774531000000003, 'longitude': -96.678344899999999, 'region': 'OK', 'slug': 'ada-ok'}, | |
{'city': 'Akron', 'dma_code': 510, 'latitude': 41.081444699999999, 'longitude': -81.519005300000003, 'region': 'OH', 'slug': 'akron-oh'}, | |
{'city': 'Albany', 'dma_code': 525, 'latitude': 31.578507399999999, 'longitude': -84.155741000000006, 'region': 'GA', 'slug': 'albany-ga'}, | |
{'city': 'Alexandria', 'dma_code': 644, 'latitude': 31.311293599999999, 'longitude': -92.445137099999997, 'region': 'LA', 'slug': 'alexandria-la'}, | |
{'city': 'Alpena', 'dma_code': 583, 'latitude': 45.061679400000003, 'longitude': -83.432752800000003, 'region': 'MI', 'slug': 'alpena-mi'}, | |
{'city': 'Altoona', 'dma_code': 574, 'latitude': 40.5186809, 'longitude': -78.394735900000001, 'region': 'PA', 'slug': 'altoona-pa'}, | |
{'city': 'Amarillo', 'dma_code': 634, 'latitude': 35.221997100000003, 'longitude': -101.8312969, 'region': 'TX', 'slug': 'amarillo-tx'}, |