Skip to content

Instantly share code, notes, and snippets.

@jonsuh
jonsuh / flexbox.css
Last active May 2, 2024 19:01
Flexbox utility classes
/* Flexbox
// ================================================== */
.d--f { display: flex; }
.d--if { display: inline-flex; }
/* Flex direction */
.fd--r { flex-direction: row; } /* Default */
.fd--rr { flex-direction: row-reverse; }
.fd--c { flex-direction: column; }
.fd--cr { flex-direction: column-reverse; }
@jonsuh
jonsuh / .bash_profile
Last active February 16, 2024 17:17
Bash echo in color
# ----------------------------------
# Colors
# ----------------------------------
NOCOLOR='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
@jonsuh
jonsuh / js-ajax-php-json-return.html
Last active September 17, 2022 02:57
jQuery AJAX Call to PHP Script with JSON Return
<div class="the-return">
[HTML is replaced when successful.]
</div>
@jonsuh
jonsuh / url_encode.rb
Created February 1, 2015 17:28
Jekyll URL Encode
# _plugins/url_encode.rb
require 'liquid'
require 'uri'
# Percent encoding for URI conforming to RFC 3986.
# Ref: http://tools.ietf.org/html/rfc3986#page-12
module URLEncode
def url_encode(url)
return URI.escape(url, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end
@jonsuh
jonsuh / js-ads.css
Created December 3, 2012 17:34
Responsive Google AdSense Ads
.js-gads {
overflow: hidden;
}
@jonsuh
jonsuh / js-video-basic.css
Last active June 8, 2019 17:06
Responsive YouTube, Vimeo, Embed, and HTML5 Videos with CSS Usage
.js-video {
height: 0;
padding-top: 25px;
padding-bottom: 67.5%;
margin-bottom: 10px;
position: relative;
overflow: hidden;
}
.js-video.widescreen {
@jonsuh
jonsuh / keybindings.json
Last active September 26, 2018 20:03
VSCode Split/Join editors to the Left/Right
[
{
"key": "cmd+k cmd+right",
"command": "macros.editorSplitRight"
},
{
"key": "cmd+k cmd+left",
"command": "macros.editorSplitLeft"
},
{
@jonsuh
jonsuh / gulpfile.js
Created October 16, 2017 22:10
Jekyll CSS Hot Reloading with Browsersync
var gulp = require('gulp');
var changed = require('gulp-changed-in-place');
var browserSync = require('browser-sync').create();
gulp.task('watch', ['css'], function() {
browserSync.init({
server: "./_site"
});
gulp.watch("_site/css/**/*.css", ['css']);
@jonsuh
jonsuh / twitter.css
Last active June 17, 2017 19:39
Un-roundify Twitter
.Avatar,
.avatar,
.DashboardProfileCard-avatarImage,
.DashboardProfileCard-avatarLink,
.EdgeButton,
.EdgeButton:visited,
.Gallery.is-tweetless .Gallery-content,
.Gallery.is-tweetless .Gallery-media,
.MomentUserByline-avatar,
.ProfileAvatar,
@jonsuh
jonsuh / keybase.md
Created October 25, 2016 16:15
keybase.md

Keybase proof

I hereby claim:

  • I am jonsuh on github.
  • I am jonsuh (https://keybase.io/jonsuh) on keybase.
  • I have a public key ASBTaBjbxTH39gxJScI215-gCuOET8DcjXYlZcUUMa3ZIQo

To claim this, I am signing this object: