function get_cert()
{
local host="$1"
local port="$2"
if [ -z "$port" ]
then
port="443"
fi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# ================================================================ | |
# << Update >> | |
# Running the following is enough, no need to build yourself | |
# sudo yum install epel-release.noarch | |
# sudo yum install xclip | |
# ================================================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# ================================================================ | |
# << Update >> | |
# Running the following is enough, no need to build yourself | |
# sudo yum install epel-release.noarch | |
# sudo yum install xsel | |
# ================================================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Code not verified / tested though. -Tianze | |
var express = require("express"); | |
var fs = require("fs"); | |
var _ = require("underscore"); | |
var dbJsonFileName = "carts.json"; | |
var dbJson = fs.readFileSync(dbJsonFileName, 'utf8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Facebook Login JavaScript Example</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<p id="greeting">Test</p> | |
<script> | |
// This is called with the results from from FB.getLoginStatus(). |
- http://www.cs.yale.edu/homes/hudak/CS201S08/lambda.pdf (terse, by a Haskell God)
- Wiki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I just finally had my mind snap into place with understanding of the Y Combinator. | |
Most explanations I read, even the ones using JS, didn't make much sense and were | |
overly long so here follows my own, much simpler explanation. I will be using JS. | |
We have fibonacci to start with, very simple recursive function. | |
It's fixed points are 0 and 1, fib(0) = 0, and fib(1) = 1 | |
That's all a fix point means, when the f(x) == x | |
They are important because they are the only values at which recursion can cease. |
Hopefully this may speed your groking of the forking torturing Y Combinator a little bit.
Disclaimer: I don't assert what I say here is accurate, or even correct (I'm not authorative, obviously), but it's my understanding and I'm sharing in the hope that someone who also struggles on the Y Combinator may benefit a tad.
- In Lambda Caculus, everything is a Lambda Caculus (Anonymous function that takes one parameter). And the best thing is that, ... drump roll ..., it's Turing Complete. So theoretically, it can caculate anything a computer can.
- In this note, I use the term
function
, which (I think) means Lambda Caculus, to sound (at least to myself) more accustomed.
- Y = λf.(λx.f (x x)) (λx.f (x x))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes | |
class Monster { | |
// A method named "constructor" defines the class’s constructor function. | |
constructor(name, health) { | |
// public name object | |
this.name = name; | |
// private name object | |
this[pHealth] = health; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defaults / Configuration options for homebridge | |
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
# If you uncomment the following line, homebridge will log more | |
# You can display this via systemd's journalctl: journalctl -f -u homebridge | |
# DEBUG=* |