Skip to content

Instantly share code, notes, and snippets.

View gseilheimer's full-sized avatar

Gilbert Seilheimer gseilheimer

View GitHub Profile
@gseilheimer
gseilheimer / config.json
Last active September 13, 2015 12:13 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
// NAVI
function bs_navigation() {
/* affix the navbar after scroll below header */
$('nav').affix({
offset: {
top: $('header').height()-$('nav').height()
}
});
@gseilheimer
gseilheimer / snippet js fnc saveRating()
Last active October 5, 2015 15:10
snippet js localstorage ajax
// LocalStorage
function saveRating() {
localStorage.clear();
if( window.localStorage!==undefined ) {
var fields = $( "form :input" ).serialize();
localStorage.setItem( "form-rating-fields", JSON.stringify( fields ) );
console.log( fields );
@gseilheimer
gseilheimer / snippet php for js fnc saveRating()
Last active October 5, 2015 18:03
snippet php for js fnc saveRating()
<?php
/**
* Created by IntelliJ IDEA.
* User: GS
* Date: 13.05.15
* Time: 13:13
*/
// settings for filenames
@gseilheimer
gseilheimer / snippet gs_bootstrap nav scolling
Created October 9, 2015 18:28
snippet gs_bootstrap nav scolling
$(function(){
var $navbar = $('nav');
$(window).scroll(function() {
$navbar.toggleClass('scrolled', $(window).scrollTop() > 40);
});
$('.nav-toggle').click(function(){
$navbar.toggleClass('expanded');
@gseilheimer
gseilheimer / viewport.js
Created November 8, 2016 16:36 — forked from bohman/viewport.js
jQuery get viewport size
// -----------
// Debugger that shows view port size. Helps when making responsive designs.
// -----------
function showViewPortSize(display) {
if(display) {
var height = jQuery(window).height();
var width = jQuery(window).width();
jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;top:40px;left:5px;color:#fff;background:#000;padding:10px">Height: '+height+'<br>Width: '+width+'</div>');
jQuery(window).resize(function() {

Keybase proof

I hereby claim:

  • I am gseilheimer on github.
  • I am gseilheimer (https://keybase.io/gseilheimer) on keybase.
  • I have a public key whose fingerprint is 5EBE 60DB 6931 842E 8E97 3D96 09CF 6A73 2BFF 089A

To claim this, I am signing this object:

@gseilheimer
gseilheimer / vmdk_vhdx.md
Created March 2, 2018 13:26 — forked from rahilwazir/vmdk_vhdx.md
Convert VMWare to Hyper-V (vmdk to vhdx)

VMDK to VHDX

Follow [steps][1]:

  • Download: http://www.microsoft.com/en-us/download/details.aspx?id=42497
  • Open Powershell as administrator and run Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'
  • And after ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:\scratch\vmx\VM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination c:\vm-disk1
@gseilheimer
gseilheimer / bookmark.min.js
Created May 4, 2018 16:58 — forked from zaydek-old/bookmark.min.js
A simple CSS debugger. Learn more here: https://medium.freecodecamp.org/88529aa5a6a3. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(path):not(g) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@gseilheimer
gseilheimer / gist:fd3f2ca3a1d324322aef0b3b6c0f90e5
Created May 16, 2018 20:16 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*