It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
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
#lang racket | |
;; this is a stand alone simple version of the closure conversion part of the hoist pass from the tarot compiler | |
;; see https://rain-1.github.io/scheme for more. | |
(require data/queue) | |
;; closure conversion for lambda calculus | |
;; | |
;; the input language is: |
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
# Debian 10 | |
aws ec2 describe-images \ | |
--region us-east-1 \ | |
--owners 136693071363 \ | |
--filters 'Name=name,Values=debian-10-amd64-*' \ | |
--query 'sort_by(Images, &CreationDate)[-1].[ImageId,Name,CreationDate]' \ | |
--output text | |
## |
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
<html> | |
<head> | |
<style type="text/css"> | |
table table { | |
width: 600px !important; | |
} | |
table div + div { /* main content */ | |
width: 65%; | |
float: left; | |
} |
This script provides a context menu item in the Project window (as well as an extra option in the Assets>Create
menu) that will instantiate the selected Scriptable object and save it as an asset to a folder of your choosing.
Throw this script in any folder called Editor
in your assets folder.
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
#!/usr/bin/env perl | |
use feature 'switch'; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use File::Basename; | |
use File::Copy; | |
use File::Path qw/make_path/; |
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
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |
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
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
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
""" | |
Queries the slowlog database table maintained by Amazon RDS and outputs it in | |
the normal MySQL slow log text format. Modified version of the script by | |
memonic (Thanks!) at https://gist.github.com/1481025 | |
Things to change in this script for your own setup: | |
<root_user> to your mysql root user (e.g. "root") | |
<root_pass> to your mysql root password (e.g. "hunter2") | |
<host_domain> to your mysql root password (e.g. "prod-01.w3rfs2.us-east-1.rds.amazonaws.com") |
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/bash | |
(/usr/local/bin/db2log | \ | |
mk-query-digest --fingerprints \ | |
--filter '$event->{user} !~ m/^(bi|memonic)$/') 2>&1 | \ | |
mail -s "MySQL slow logs" root | |
# Rotate slow logs. Will move them into the backup table slow_log_backup. If | |
# that table exists it's overwritten with the primary slow log. | |
# So with this strategy we can still access yesterday's slow log by querying | |
# slow_log_backup. |
NewerOlder