Skip to content

Instantly share code, notes, and snippets.

View ghalusa's full-sized avatar
🤓
Geekin'

Goran Halusa ghalusa

🤓
Geekin'
View GitHub Profile
@ghalusa
ghalusa / youtube_id_regex.php
Created June 20, 2015 23:14
Extract the YouTube Video ID from a URL in PHP
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ
@ghalusa
ghalusa / freetds_install_ubuntu_14.md
Last active July 10, 2023 17:44
Installing and Configuring FreeTDS on Ubuntu 14.04.4 LTS and Establish a Connection via PHP PDO

Installing and Configuring FreeTDS on Ubuntu 14.04.4 LTS and Establish a Connection via PHP PDO


Install

sudo apt-get install -y unixodbc unixodbc-dev unixodbc-bin libodbc1 odbcinst1debian2 tdsodbc php5-odbc
@ghalusa
ghalusa / default
Last active March 7, 2023 12:17
nginx default configuration file (ubuntu path: /etc/nginx/sites-available/default) with conversions of .htaccess environment variables and mod_rewrite logic, along with parameters supporting a fastcgi-based php setup
server {
listen 80;
root /var/www/YOUR_DIRECTORY;
index index.php index.html index.htm;
###################################################
# Change "yoururl.com" to your host name
server_name yoururl.com;
@ghalusa
ghalusa / ampps_debug_mac.md
Last active December 1, 2020 01:39
Getting AMPPS to fully run after installation on Mac OS X 10.8.x
@ghalusa
ghalusa / org.mongo.mongod.plist
Created September 21, 2014 23:39
MongoDB startup plist file for Mac OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.mongo.mongod</string>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
@ghalusa
ghalusa / jenkins_docker.md
Last active October 3, 2020 01:37
Set Up a Jenkins Environment using Docker
@ghalusa
ghalusa / install_drupal_8_composer.md
Last active March 5, 2020 18:51
Installing Drupal 8 Using Composer
@ghalusa
ghalusa / gist:5485982
Last active February 25, 2020 21:48
Install node.js on a raspberry pi
wget http://nodejs.org/dist/v0.10.5/node-v0.10.5-linux-arm-pi.tar.gz
cd /usr/local
sudo tar xzvf ~/node-v0.10.5-linux-arm-pi.tar.gz --strip=1
vi ~/.bash_aliases
export PATH=$PATH:/usr/local/bin/node
bash
node -v
@ghalusa
ghalusa / macosx_cask.md
Last active December 13, 2018 11:52
Mac OS X Setup Using Homebrew Cask

Gor's Mac OS X

Install Brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Homebrew Cask

@ghalusa
ghalusa / 20180628_aaa_ogmt_theme_chnages.md
Last active June 28, 2018 16:04
AAA OGMT Theme Changes

ogmt.inc

(sites/all/modules/ogmt/ogmt.inc)

Line 500

Was:

$classes_array = ['page-' . $n, 'pagecount-' . $page_count];