Skip to content

Instantly share code, notes, and snippets.

View pongstr's full-sized avatar
:octocat:

pongstr pongstr

:octocat:
View GitHub Profile
@pongstr
pongstr / Package Control.sublime-settings
Last active September 18, 2020 15:17
Sublime Text 3 Settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"GitGutter",
"Package Control",
"SideBarEnhancements",
@pongstr
pongstr / .vimrc
Last active August 17, 2020 21:10
" .vimrc
set nocompatible " Disable Vi compatibility
set backspace=indent,eol,start " Backspace through everything in INSERT mode
set ttyfast " Optimize for fast terminal connections
set nowrap " Disable word wrapping
set textwidth=0 wrapmargin=0 " Set textwidth + wrapmargin
set encoding=utf-8 nobomb " Use UTF-8 without BOM
set shiftwidth=2 " Use 2 spaces for indentation
set softtabstop=2 " Use 2 spaces for soft tab
{
"atomKeymap.promptV3Features": true,
"editor.tabSize": 2,
"editor.multiCursorModifier": "ctrlCmd",
"editor.fontFamily": "Consolas, Menlo, Monaco, 'Courier New', monospace",
"editor.tabCompletion": "onlySnippets",
"editor.lineHeight": 22,
"editor.scrollbar.verticalScrollbarSize": 5,
"editor.scrollbar.horizontalScrollbarSize": 5,
"editor.rulers": [
@pongstr
pongstr / README.md
Last active February 21, 2020 22:07
Display Google Docs Spreadsheet as JSON.

Google Docs Spreadsheet as JSON

This code is taken from DJ's Weblog, thanks a lot for this!

How to use:

  1. You'll need the key of your spreadsheet, the url format should be like this: https://docs.google.com/spreadsheet/ccc?key=**YOUR-KEY-HERE**=drive_web#gid=0 and also the sheet number (i.e., Sheet 1).
  2. In your document file menu, you'll find File Menu > Tools > Script Editor (you will be redirected to Google's script editor.
  3. Create a new Script file, and paste the content of the SheetAsJSON.js to the editor stage, and save it.
@pongstr
pongstr / aspect-ratio.scss
Last active February 5, 2020 09:02
Utilized for divs with background image that scales
// #==
// 4:3 Aspect Ratio
@mixin box-ratio-calc($width: ""){
@if ($width == "") {
width: 185px;
height: 118px;
} @else {
width: $width;
height: ($width / 4) * 3;
}
@pongstr
pongstr / angular-material-dashboard.markdown
Created December 23, 2016 18:04
Angular Material Dashboard
@pongstr
pongstr / breadcrumb.md
Created June 7, 2018 16:47
A simple Jekyll breadcrumb.

Jekyll Breadcrumb

A simple Jekyll breadcrumb without plugin.

{% capture url_tree %}
  {{ page.url | replace: '/', ' ' | strip }}
{% endcapture %}
@pongstr
pongstr / ribbon.css
Last active March 22, 2018 11:36
CSS Ribbons
/*!
* CSS3 Ribbons by @pongstr
* http://codepen.io/pongstr/pen/jxhbu
*/
body,html{height:100%;font-family:"Helvetica Neue",Helvetica,sans-serif}*,:after,:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.container{margin-left:auto;margin-right:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:768px}}@media (min-width:992px){.container{width:992px}}@media (min-width:1200px){.container{width:1200px}}h1{display:block;clear:both;width:96%;margin:25px auto;font-family:Pacifico,cursive;font-size:64px;font-weight:700;text-align:center;background:-webkit-linear-gradient(#5bc0de,#428bca);-webkit-background-clip:text;-webkit-text-fill-color:transparent}pre{position:relative;margin:15px auto;padding:10px;font-family:Consolas,Menlo,Courier,monsopace;font-size:13px;line-height:1.5;border:1px solid #ddd;background-color:#f4f4f4;border-radius:4px;box-shadow:0 0 5px rgba(51,51,51,.1)inset}@media (min-width:480px){pre{float:left;width:100%}}@media (mi
@pongstr
pongstr / defer.js
Last active October 8, 2017 12:27
Deferring Image
(function () {
function onLoad() {
return function imageDefer() {
var defer = document.getElementsByTagName('img');
(defer && defer.length < 0) && Object.keys(defer).forEach(function (i) {
(defer[i].getAttribute('data-src')) &&
defer[i].setAttribute('src', defer[i].getAttribute('data-src'));
});
}
}

Dotfiles Lite

Taken from mathiasbynens/dotfiles. Save time and pain from customising your clean-installed Mac, install web development tools and native applications. It's straight-forward and simple, here's how you run it:

Download osx.sh and tools.sh to your desktop, open osx.sh on your favorite text editor and change these lines:

# Set computer name (as done via System Preferences → Sharing)
sudo scutil --set ComputerName "Pongstr"