Skip to content

Instantly share code, notes, and snippets.

View lloc's full-sized avatar
🏠
Working from home

Dennis Ploetner lloc

🏠
Working from home
View GitHub Profile
@lloc
lloc / gist:5685040
Last active July 14, 2016 02:59
WordPress - Add link to plugin_row_meta
<?php
define( 'PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
function my_plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
if ( PLUGIN_BASENAME == $plugin_file )
$plugin_meta[] = '<a href="#">Test: plugin_row_meta</a>';
return $plugin_meta;
}
add_filter( 'plugin_row_meta', 'my_plugin_row_meta', 10, 4 );
@lloc
lloc / sort-array-like-object.js
Created June 6, 2014 12:56
Sort an array-like object with underscore.js
var i, key, pairs,
obj = {'4': 'alpha', '2': 'beta', '5': 'gamma', '1': 'delta', '3': 'epsilon'};
for (key in obj) {
console.log(key + ': ' + obj[key]);
}
pairs = _.pairs(obj);
obj = _.sortBy(pairs, function (item) { return item[1]; });
print("Merry Christmas")
PRINT "Merry Christmas"
IDENTIFICATION DIVISION.
PROGRAM-ID. MERRY-CHRISTMAS.
PROCEDURE DIVISION.
DISPLAY "Merry Christmas".
STOP RUN.
#include <stdio.h>
int main()
{
printf("Merry Christmas\r\n");
return 0;
}
print "Merry Christmas\n";
@lloc
lloc / merry-christmas.php
Last active December 7, 2017 17:50
Merry Christmas in PHP
<?php
echo "Merry Christmas\n";
#!/usr/bin/env bash
echo "Merry Christmas"
puts 'Merry Christmas'