Skip to content

Instantly share code, notes, and snippets.

View gseilheimer's full-sized avatar

Gilbert Seilheimer gseilheimer

View GitHub Profile
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@gseilheimer
gseilheimer / readme.md
Created February 7, 2019 07:12 — forked from hofmannsven/readme.md
Install PHP Composer on Managed Hosting at Domainfactory.

Install Composer on Managed Hosting at Domainfactory

Step 1:

Log in to your Managed Hosting Server via SSH. Create your .bashrc:

touch .bashrc
@gseilheimer
gseilheimer / gist:b0cff0f5adab063813cab7e710b43473
Created February 7, 2019 07:00 — forked from gthln/gist:8401080
Install Composer on Managed Hosting at Domainfactory

Install Composer on Managed Hosting at Domainfactory

Step 1:

Log in to your Managed Hosting Server via SSH

Step 2:

Add these two lines to .bashrc:

@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*
@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 / 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

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 / ausgabe.php
Created April 16, 2017 08:26 — forked from skerbis/getaslice_ausgabe.php
redaxo 5 - get a slice
<?php
if( "REX_VALUE[2]" != "" )
{
// Im Backend den Link zur Quelle anzeigen
if(rex::isBackend())
{
$master = rex_article::get(REX_LINK[id=1 output=id]);
@gseilheimer
gseilheimer / redaxo rex_var::toArray
Created February 1, 2017 20:55
redaxo rex_var::toArray
Zu den Arrays
Eingabe:
CODE: ALLES AUSWÄHLEN
$value1 = rex_var::toArray('REX_VALUE[1]');
<input type="text" name="VALUE[1][]" value="<?php echo $value1[0]; ?>" />
Ausgabe
CODE: ALLES AUSWÄHLEN
@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() {