##Monads for functional programming (in Elm)
Adaptation of the examples in Philip Wadler's paper "Monads for functional programming" for the Elm language.
These examples can easily be tried out on the online elm playground: http://elm-lang.org/try
##Monads for functional programming (in Elm)
Adaptation of the examples in Philip Wadler's paper "Monads for functional programming" for the Elm language.
These examples can easily be tried out on the online elm playground: http://elm-lang.org/try
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
Look for any outbound port 80 connections with:
lsof -i :80
You will see your own apache server in that list too, but keep an eye for other stuff.
usually, attacks like this are very obvious in the output of:
ps faux
sudo su postgres | |
psql | |
update pg_database set datistemplate=false where datname='template1'; | |
drop database Template1; | |
create database template1 with owner=postgres encoding='UTF-8' | |
lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; | |
update pg_database set datistemplate=true where datname='template1'; |
<?php | |
// rewrite /wp-content/themes/theme-name/css/ to /css/ | |
// rewrite /wp-content/themes/theme-name/js/ to /js/ | |
// rewrite /wp-content/themes/theme-name/img/ to /img/ | |
// rewrite /wp-content/plugins/ to /plugins/ | |
function roots_flush_rewrites() { | |
global $wp_rewrite; | |
$wp_rewrite->flush_rules(); | |
} |
<?php | |
function roots_root_relative_url($input) { | |
$output = preg_replace_callback( | |
'!(https?://[^/|"]+)([^"]+)?!', | |
create_function( | |
'$matches', | |
// if full URL is site_url, return a slash for relative root | |
'if (isset($matches[0]) && $matches[0] === site_url()) { return "/";' . | |
// if domain is equal to site_url, then make URL relative |
@import "compass/css3/transform"; | |
@mixin vertically-centre-descendant($descendant-selector, $descendant-position: relative) { | |
@include transform-style(preserve-3d); | |
position: relative; | |
#{$descendant-selector} { | |
@include transform(translateY(-50%)); | |
position: $descendant-position; | |
top: 50%; |