Skip to content

Instantly share code, notes, and snippets.

View ultim8k's full-sized avatar
🛠️
Rock & roll!

Kostas Kapenekakis ultim8k

🛠️
Rock & roll!
View GitHub Profile
@ultim8k
ultim8k / hhg-how-to.md
Created November 20, 2015 12:16
Hello!

Hevnly Magazine

aka HHG

How to post

  1. You can read about markdown syntax in markdown cheatsheet, but generally you will need these:
  • *italics*
  • **bold**
  • [link name](http://link.com)
  • ![image alt text](image-file-name.jpg)
  • >Quote text
@ultim8k
ultim8k / dabblet.css
Last active November 20, 2015 17:23
Untitled
* { box-sizing: border-box; }
html { font-family: ProximaNova-Regular, "Proxima Nova","Open Sans","Gill Sans MT","Gill Sans",Corbel,Arial,sans-serif; }
.text-center { text-align: center; }
.logo {
display: block;
}
.logo__icon,
.logo__text {
display: inline-block;
vertical-align: middle;
@ultim8k
ultim8k / A UUID
Last active March 9, 2016 11:05 — forked from jed/LICENSE.txt
generate random UUIDs
aaa
@ultim8k
ultim8k / osx_automount_nfs.md
Created January 29, 2016 11:11 — forked from L422Y/osx_automount_nfs.md
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@ultim8k
ultim8k / gist:06bdaefdde85d58588fa
Created February 24, 2016 15:15 — forked from awatson1978/gist:a0df5fef953b9da01ce1
Publish an Atom Package
command-shift-P > Package > Package Generator: Generate Syntax Theme > mypackage
cd ~/.atom/packages/mypackage
apm login
apm develop mypackage
cd ~/github/mypackage
sudo chown -R username:wheel .
git commit -a -m 'checking everything in'
apm publish --tag v2.5.0 minor
#!/usr/bin/env bash
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
# brew update
@ultim8k
ultim8k / post-merge
Created June 11, 2016 13:53 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
$.ajaxSetup({crossDomain : true});
var url = 'https://your-url-is-here.com';
var handleSuccess = function(resp) {
$('.loader').hide();
$('.email_input').val('');
$('.thanks').show();
};
var handleError = function(resp) {
@ultim8k
ultim8k / post-receive
Created August 29, 2016 19:56 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@ultim8k
ultim8k / palindromic.js
Last active September 7, 2016 16:17
check palindromic text
function isPalindromic(textStr) {
if (!textStr) { return new Error('Missing string parameter.'); }
if (typeof textStr !== 'string') { return new Error('Parameter must be a string.'); }
return textStr.split('').reverse().join('') === textStr;
}