Skip to content

Instantly share code, notes, and snippets.

View vastus's full-sized avatar
🦅
all(good)

Juho Hautala vastus

🦅
all(good)
View GitHub Profile
<?php
/*
* Getting too many redirects when SSL is not on and the WP_HOME and
* WP_SITEURL settings are set.
*
* These settings should work with CloudFront and a WP instance.
*/
$protocol = (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) ? $_SERVER['HTTP_X_FORWARDED_PROTO'] : 'http';
function compose2<T, U>(g: (n: T) => U, f: (m: T) => T) {
return function (x: T) {
return g(f(x));
}
}
const inc = (x: number) =>
x + 1;
const add = (x: number) => (y: number) =>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-- customer IDs and ID types
DELETE FROM dm_b2c_marketing.customer_b2c;
INSERT INTO dm_b2c_marketing.customer_b2c (
customer_id,
id_domain,
dp_customer_id
) VALUES (
'shogun-alice',
'shogun',
'dp-inner-alice'
lengthAndSum :: [Int] -> State Int Int
lengthAndSum [] = return 0
lengthAndSum (x:xs) = do
let (len, sum) = runState (lengthAndSum xs) x
put (sum + x)
return (len + 1)
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>redir</title>
</head>
<body>
<input id="input" type="number" value="403" />
<button id="button">Action</button>
<script>
@vastus
vastus / keybase.md
Created February 10, 2017 09:13
Keybase

Keybase proof

I hereby claim:

  • I am vastus on github.
  • I am juhoth (https://keybase.io/juhoth) on keybase.
  • I have a public key ASBmtwoVKbckGE3DA_90YacDCscTQ8VUNmu9JY4CYvknEQo

To claim this, I am signing this object:

require 'axlsx'
require 'byebug'
rows = [
[nil, nil, nil, "Mitkä seikat"],
["Etunimi", "Sukunimi", "HETU", "Esimies", "Ympäristö", "Työtehtävä", "Kuormitus"],
["Olli", "Isometsä", "123456-000X", "Kyllä", "Ei", "Kyllä"],
]
Axlsx::Package.new do |p|
@vastus
vastus / .vimrc
Last active July 26, 2016 11:28
Remove colorcolumn that editorconfig-vim inserts
g:EditorConfig_max_line_indicator = "none"
@vastus
vastus / näytöt.md
Last active July 19, 2016 10:27
Näytöt