Skip to content

Instantly share code, notes, and snippets.

View heidilux's full-sized avatar

Josh Pike heidilux

View GitHub Profile
@stnvh
stnvh / intel.sh
Created October 23, 2014 10:41
Downloads the latest Intel HD Graphics driver from OSX combo update
#!/bin/bash
URL="http://support.apple.com/downloads/DL1760/en_US/OSXUpdCombo10.9.5.dmg"
if [[ ! -f /tmp/OSXUpdCombo10.9.5.dmg ]]; then
echo 'Downloading 10.9.5 Combo...'
curl -Lo /tmp/OSXUpdCombo10.9.5.dmg $URL
fi
if [[ ! -d /tmp/ComboMount ]]; then
@elena-kolevska
elena-kolevska / validators.php
Last active June 24, 2021 14:44
Custom alphabetic validator that allows spaces
<?php
/* app/validators.php */
Validator::extend('alpha_spaces', function($attribute, $value)
{
return preg_match('/^[\pL\s]+$/u', $value);
});
/*
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 3, 2024 12:59
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@msurguy
msurguy / DB.sql
Last active August 20, 2023 18:02
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
@barnes7td
barnes7td / sublime_setup.md
Last active March 28, 2024 17:59
Sublime Terminal Setup

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy sublime executable to your ~/bin directory:

@fernandoaleman
fernandoaleman / Linux Static IP
Created March 23, 2012 16:20
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static