Skip to content

Instantly share code, notes, and snippets.

View stalinkay's full-sized avatar
💭
Ominverse 🌌

Stalin Kay stalinkay

💭
Ominverse 🌌
View GitHub Profile
#####
# OS X temporary files that should never be committed
.DS_Store
*.swp
*.lock
profile
####
# Xcode temporary files that should never be committed
*~.nib
@stalinkay
stalinkay / criteria-to-query-builder.php
Created May 21, 2016 18:02 — forked from jgornick/criteria-to-query-builder.php
Doctrine: Criteria Array to Doctrine QueryBuilder
<?php
/**
* Recursively takes the specified criteria and adds too the expression.
*
* The criteria is defined in an array notation where each item in the list
* represents a comparison <fieldName, operator, value>. The operator maps to
* comparison methods located in ExpressionBuilder. The key in the array can
* be used to identify grouping of comparisons.
*
@stalinkay
stalinkay / README.md
Created June 22, 2016 11:27 — forked from tomazzaman/README.md
Gulp workflow for WordPress theme development

Gulp workflow for WordPress theme development

Requirements

In order for Livereload to work, you need a Firefox or Chrome extension as Gulp doesn't inset it automatically. Alternatively, you can also manually put the livereload script in footer.php, just make sure to insert it only on development environment:

<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@stalinkay
stalinkay / .gitignore
Created June 22, 2016 19:58
.gitignore for Xcode 7.x and Swift 2.x
#########################
# .gitignore file for Xcode 7 Source Projects
# can be used for watchOS, tvOS, iOS, OSX, Swift development
#
# February 2016
#
# Save this file as .gitignore in your repository's working directly.
# Note: Don't confuse the working directory with the .git directory. It will not work if you put it there.
#
#####
@stalinkay
stalinkay / gist:012e4d31d2bb17bbb4ef7524963c9a12
Created June 22, 2016 22:26 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@stalinkay
stalinkay / git_branch_naming.md
Created June 22, 2016 22:28 — forked from revett/git_branch_naming.md
Git Branch Naming Conventions

<type>/<name>

<type>

bug    - Code changes linked to a known issue.
feat   - New feature.
hotfix - Quick fixes to the codebase.
junk   - Experiments (will never be merged).
@stalinkay
stalinkay / node-and-npm-in-30-seconds.sh
Created July 1, 2016 11:25 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@stalinkay
stalinkay / node_mac.sh
Created July 1, 2016 11:28 — forked from mpalpha/node_mac.sh
Use npm global without sudo on OSX
#!/bin/bash
#
# Install or Update Homebrew as needed
#
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
# https://github.com/mxcl/homebrew/wiki/installation
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@stalinkay
stalinkay / gist:abd271cd390a0ffee58bae23d95d4ffe
Created July 23, 2016 04:30 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@stalinkay
stalinkay / multiple_ssh_setting.md
Created July 24, 2016 21:18 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"