Skip to content

Instantly share code, notes, and snippets.

@olimortimer
olimortimer / ral_colours.php
Last active August 30, 2024 17:23
PHP: RAL Colours as RGB
<?php
// Includes text RGB to show text as white or black. This value was calculated using;
// $brightness = sqrt( (R * R * .299) + (G * G * .587) + (B * B * .114) )
// If $brightness was greater than 130, then the text was set to white
$ral_colours => array(
'RAL 1000' => array(
'rgb' => '190,189,127',
'name' => 'Green Beige',
/* Social Media Brand Colors
twitter: #00aced rgb(0, 172, 237)
facebook: #3b5998 rgb(59, 89, 152)
googleplus: #dd4b39 rgb(221, 75, 57)
pinterest: #cb2027 rgb(203, 32, 39)
linkedin: #007bb6 rgb(0, 123, 182)
youtube: #bb0000 rgb(187, 0, 0)
vimeo: #aad450 rgb(170, 212, 80)
tumblr: #32506d rgb(50, 80, 109)
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@vitorbritto
vitorbritto / rm_mysql.md
Last active November 5, 2024 05:41
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active October 31, 2024 13:38
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@nwaelkens
nwaelkens / ral_colours.php
Last active May 3, 2023 08:27 — forked from olimortimer/ral_colours.php
PHP: RAL Colours as RGB
<?php
// Includes text RGB to show text as white or black. This value was calculated using;
// $brightness = sqrt( (R * R * .299) + (G * G * .587) + (B * B * .114) )
// If $brightness was greater than 130, then the text was set to white
$ralColours = array(
'RAL 1000' => array(
'rgb' => '190,189,127',
'name_en' => 'Green Beige',
@noelboss
noelboss / git-deployment.md
Last active October 12, 2024 16:09
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A