Skip to content

Instantly share code, notes, and snippets.

View pongstr's full-sized avatar
:octocat:

pongstr pongstr

:octocat:
View GitHub Profile
@pongstr
pongstr / sticky-topbar.js
Created April 24, 2013 01:56
sticky topbar
//Calculate the height of <header>
//Use outerHeight() instead of height() if have padding
var aboveHeight = $('#topbar').outerHeight();
// on scroll event
$(window).scroll(function(){
//if scrolled down more than the header's height
if ($(window).scrollTop() > aboveHeight){
$('#topbar').addClass('sticky').fadeIn();
@pongstr
pongstr / multiple_blogs.md
Created May 23, 2013 00:50
Wordpress Multiple Blogs with *wildcard domain

Wordpress Multisite Setup for local development.

After you've copied wordpress folder/files to your localhost directory, create the wordpress database like you normally would and once you've done that, follow these steps carefully:

###Step 1: CREATE SITE ALIAS

If you're not using MAMP Pro or any fancy webserver, you'll have to create

@pongstr
pongstr / fusion_drive.md
Last active December 17, 2015 15:29
DIY Fusion Drive: If you've replaced your Macbook Pro's super drive with HDD via hdd caddy and would like to try or use the Fusion Drive technology.

DIY Fusion Drive with OSX Mountain Lion

Disclaimer: I'am not to be held liable to any damage to your personal computer, data loss when using these scripts, it worked flawlessly based on my experience so it should be the same with yours unless you've discovered something that does not exists yet, everything should be just fine.

.thumbnails > li.span2:nth-child(6n+1),
.thumbnails > li.span3:nth-child(4n+1),
.thumbnails > li.span4:nth-child(3n+1),
.thumbnails > li.span6:nth-child(2n+3){ margin-left: 0 !important; }

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"
@pongstr
pongstr / rvm-ssl-update.sh
Last active December 24, 2015 12:59
Fix for “OpenSSL certificate verify failed” with Ruby
# =================================================================
# Use RVM to Fix SSL Certificates
# =================================================================
# Taken from Daniel Kehoe's Blog Post
# http://railsapps.github.io/openssl-certificate-verify-failed.html
# =================================================================
# Update RVM
$ sudo rvm get stable
@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 / bookmarklet.js
Created November 15, 2013 00:13
Bookmarklet
javascript:(function(){
var test = document.getElementById('readme');
test.style.display = 'none';
// console.log(test)
}());

jQuery UI Sortable Events


$(".pageContent").sortable({
    start: function(e,ui){
        //Before all other events
        //Only occurs once each time sorting begins
    },
@pongstr
pongstr / Globe4gLTE.md
Last active October 3, 2023 05:39
Access to Globe Broadband's Azatech DSL5001EN Router

Globe 4G LTE (Internet Only)

Noob access to administer your local area network and wifi access:

http://192.168.254.254

username: user
password: @l03e1t3