Skip to content

Instantly share code, notes, and snippets.

Avatar

gmo gmolop

View GitHub Profile
@gmolop
gmolop / create-project.sh
Last active Oct 24, 2019 — forked from jasonlewis/create-project.sh
Bash script that creates a new project and virtual host for that project. Can also be used to quickly create a new Laravel project.
View create-project.sh
#!/bin/bash
# This script creates a new project (or site) under /var/sites and creates
# new virtual host for that site. With the options a site can also
# install the latest version of Laravel directly.
# This script was originally based on the following script by @Nek from
# Coderwall: https://coderwall.com/p/cqoplg
# Display the usage information of the command.
createProjectUsage() {
@gmolop
gmolop / main.js
Last active Oct 26, 2017
Fix for Chrome Extension "Gmail syntax highlighting" by "devartis" Raw Raw
View main.js
/**
* Chrome Extension: Gmail syntax highlighting
* @author : [devartis](http://www.devartis.com/)
* @url : https://chrome.google.com/webstore/detail/gmail-syntax-highlighting/pcipmnfalbiopheelcmpllcjciifkaeh
* @file : main.js
* @version : Modified
*/
function convert() {
var selObj = window.getSelection();
@gmolop
gmolop / confirm_delete.py
Created Mar 28, 2017
Sublime Text 3: Confirm dialog to delete file(s)
View confirm_delete.py
# Source: http://stackoverflow.com/a/35630637/1601332
# Credit: @iron77
# File path: ~/Library/Application Support/Sublime Text 3/Packages/User/confirm_delete.py
from Default.side_bar import *
class DeleteFileCommand(sublime_plugin.WindowCommand):
def run(self, files):
if len(files) == 1:
message = "Delete File %s?" % files[0]
@gmolop
gmolop / JavaScriptUsefulHacks.js
Last active May 4, 2016
JavaScript Useful Hacks
View JavaScriptUsefulHacks.js
//------------------------------------------------------------------------------
/**
* Converting to boolean using !! operator
*
* Sometimes we need to check if some variable exists or if it has a valid value,
* to consider them as true value. For do this kind of validation, you can use
* the !! (Double negation operator) a simple !!variable, which will automatically
* convert any kind of data to boolean and this variable will return false only if
* it has some of these values: 0, null, "", undefined or NaN, otherwise it will
* return true.
@gmolop
gmolop / vhx4.sh
Created Oct 6, 2015 — forked from ericbroska/vhx4.sh
The simple way to reset available trial time of VirtualHostX application (3.x, 4.x)
View vhx4.sh
#!/bin/sh
#
# Thanks @tylerhall for this tip
rm ~/Library/Application\ Support/VirtualHostX/". "
# you can also do some fun like this
# echo "99999999999999999999" > ~/Library/Application\ Support/VirtualHostX/". "
@gmolop
gmolop / cracking.md
Last active Aug 29, 2015 — forked from vertexclique/cracking.md
Alternative method for OS X
View cracking.md

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text