Skip to content

Instantly share code, notes, and snippets.

@mariolopjr
mariolopjr / envVarCreate.ps1
Created April 4, 2020 13:59
Create environment variable with PowerShell
$SSHPath = (Get-Command -Name 'ssh.exe').Source
[Environment]::SetEnvironmentVariable('GIT_SSH', $SSHPath, 'User')
orig url: https://pastebin.com/umhdBsPu
========= ========== ===== =====
========= ============ ====== ======
=== === ==== ===== =====
=== ========= ====== ====== INSTALLIN' THAT SWEET SWEET
=== ======== ============= BIG IRON ON YOUR LINUX LAPTOP
=== ========= ============= OR SERVER - BY MR. SKILLFULL
=== === ==== === === ===
========= ============ ===== = =====
@mariolopjr
mariolopjr / freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Created February 7, 2019 02:44 — forked from zg/freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Create FreeBSD virtual machine using qemu. Run the VM using xhyve.

TL;DR

  • Create 10GB FreeBSD image using QEMU.
  • Run the VM using xhyve.
  • Mount host directory.
  • Resize the image.

Requisites

@mariolopjr
mariolopjr / install.bash
Last active January 15, 2018 16:36 — forked from isc30/install.bash
Raspberry Pi Install PHP7.0 + Nginx + MySQL + PhpMyAdmin
#!/bin/bash
# Thanks to https://gist.github.com/Lewiscowles1986/ce14296e3f5222082dbaa088ca1954f7
if [ "$(whoami)" != "root" ]; then
echo "Run script as ROOT please. (sudo !!)"
exit
fi
echo -e 'LANGUAGE=en_US.UTF-8\nLANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale
sed -i -e "s/# en_US.*/en_US.UTF-8 UTF-8/" /etc/locale.gen
@mariolopjr
mariolopjr / ads.js
Last active January 7, 2018 07:48
Add block under posts for affiliate links
var ads = `
<article class="read-next-card" style="background-image: url(/content/images/2018/01/blog.jpg)">
<header class="read-next-card-header">
<small class="read-next-card-header-sitetitle">— techmunchies —</small>
<h3 class="read-next-card-header-title"><a href="#">Affiliates</a></h3>
</header>
<div class="read-next-divider"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14.5s2 3 5 3 5.5-2.463 5.5-5.5S21 6.5 18 6.5c-5 0-7 11-12 11C2.962 17.5.5 15.037.5 12S3 6.5 6 6.5s4.5 3.5 4.5 3.5"></path></svg>
</div>
<div class="read-next-card-content">
<ul>
@mariolopjr
mariolopjr / prism-custom.js
Last active December 30, 2023 23:35
Prism Script for Ghost
// License: MIT
Prism.plugins.autoloader.languages_path = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.9.0/components/';
Prism.plugins.autoloader.ignored_language = 'none'; // Update to allow arrays...
Prism.plugins.NormalizeWhitespace.setDefaults({
'remove-trailing': true,
'remove-indent': true,
'left-trim': true,
'right-trim': true,
});
@mariolopjr
mariolopjr / init.coffee
Last active October 29, 2016 15:44
Sync Settings for Atom Editor: automatic update by http://atom.io/packages/sync-settings
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@mariolopjr
mariolopjr / docker-compose.yml
Created October 7, 2016 16:19
example-db-site-hosting-docker-compose
version: '2'
services:
nginx:
image: nginx:1.11.0-alpine
ports:
- "80:80"
depends_on:
- php
volumes:
- .:/usr/share/nginx/html
@mariolopjr
mariolopjr / bot-blocking-expression
Last active September 14, 2016 19:31 — forked from sublimecoder/bot-blocking-expression
IIS Regex Bot Blocking Rule
^$|python-requests/2.11.1|EasouSpider|Add Catalog|PaperLiBot|Spiceworks|ZumBot|RU_Bot|Wget|Java/1.7.0_25|Slurp|FunWebProducts|80legs|Aboundex|AcoiRobot|Acoon Robot|AhrefsBot|aihit|AlkalineBOT|AnzwersCrawl|Arachnoidea|ArchitextSpider|archive|Autonomy Spider|Baiduspider|BecomeBot|benderthewebrobot|BlackWidow|Bork-edition|Bot mailto:craftbot@yahoo.com|botje|catchbot|changedetection|Charlotte|ChinaClaw|commoncrawl|ConveraCrawler|Covario|crawler|curl|Custo|data mining development project|DigExt|DISCo|discobot|discoveryengine|DOC|DoCoMo|DotBot|Download Demon|Download Ninja|eCatch|EirGrabber|EmailSiphon|EmailWolf|eurobot|Exabot|Express WebPictures|ExtractorPro|EyeNetIE|Ezooms|Fetch|Fetch API|filterdb|findfiles|findlinks|FlashGet|flightdeckreports|FollowSite Bot|Gaisbot|genieBot|GetRight|GetWeb!|gigablast|Gigabot|Go-Ahead-Got-It|Go!Zilla|GrabNet|Grafula|GT::WWW|hailoo|heritrix|HMView|houxou|HTTP::Lite|HTTrack|ia_archiver|IBM EVV|id-search|IDBot|Image Stripper|Image Sucker|Indy Library|InterGET|Internet Ninja|internet
@mariolopjr
mariolopjr / discard_JEvents_iCal_Import_Messages.php
Last active November 19, 2015 14:36
Discard JEvents iCal Import Events from Showing on Front End
<?php // This PHP opening tag can be discarded, only exists for syntax coloring :)
/*
*
* Author: Mario Lopez (iibits.com)
* License: MIT
*
* Instructions to implement will follow
*
*/