Skip to content

Instantly share code, notes, and snippets.

View aabumuslimov's full-sized avatar

Andrey Abumuslimov aabumuslimov

  • Adobe
  • Los Angeles, CA
View GitHub Profile
@ydenyshchenk
ydenyshchenk / urlRewriteReindex.php
Last active April 12, 2017 20:20
Magento 2 URL Rewrite full reindex
<?php
/*
###############################################
WARNING: this script truncates url rewrite tables and generates system url rewrites;
ALL CUSTOM URL REWRITES WILL BE DELETED
###############################################
*/
const BATCH_SIZE = 5;
@albertbori
albertbori / Installation.md
Last active June 15, 2024 02:19
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@egel
egel / auto-remove-sublime-license-popup
Last active April 8, 2024 23:00
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)