Skip to content

Instantly share code, notes, and snippets.

View sunnywalker's full-sized avatar

Sunny Walker sunnywalker

View GitHub Profile
@sunnywalker
sunnywalker / html-table-to-markdown-extra.html
Last active August 3, 2022 12:09
HTML Table to Markdown Extra converter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Table to Markdown Extra Table</title>
<style>
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
body { font-family: -apple-system, "Segoe UI", Arial, Helvetica, sans-serif; line-height: 1.5;
text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
textarea { width: 100%; height: 15em; }
@sunnywalker
sunnywalker / uh_login_service_sample.php
Created June 30, 2012 00:43
Using the UHLoginService PHP class
<?php
// assume session_start(); somewhere prior to this
//set the user level based on the uh username (could also check a database or something)
//this function, if it exists, will get called by the class
function getUserLevelByName($uh_username) {
return in_array($uh_username, array('swalker', 'jvelasqu')) ? 100 : 10; //these people get 100 user level, everybody else gets a 10
}
//include the php class
/**
* gray test
*/
* { -webkit-box-sizing: border-box; box-sizing: border-box; }
body {
background: #eee;
min-height:100%;
font-family: sans-serif;
text-shadow: 1px 1px 1px rgba(255,255,255,.8);