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 / collection-merge.js
Created March 19, 2015 22:12
Merge cwllections
var ar = [{date:'2015-01-01', data:15}, {date:'2015-02-01', data:18}, {date:'2015-02-05', data:10}, {date:'2015-02-06', data:25}];
var br = [{date:'2015-01-01', v:3}, {date:'2015-02-01', v:1}, {date:'2015-02-09', v:20}];
var merged = [];
for(var i=0;i<ar.length;i++){
var check = 0;
for(var j=0;j<br.length;j++){
if(ar[i].date === br[j].date) {
check = 1;
merged.push({date: ar[i].date, data: ar[i].data, v: br[j].v});
continue;
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
[
{ "keys": ["super+t"], "command": "new_file" },
{ "keys": ["super+k", "super+s"], "command": "swap_case" },
{ "keys": ["super+k", "super+t"], "command": "title_case" },
{ "keys": ["super+alt+c"], "command": "insert_snippet","args": {"contents": "console.log($0);"} },
{ "keys": ["super+alt+l"], "command": "insert_snippet","args": {"contents": "util.debug($0);"} },
{ "keys": ["alt+shift+f"], "command": "insert_snippet","args": {"contents": "function(e, data) {\n\t$0\n};"} }
]
{
"binary_file_patterns":
[
"*.scssc",
"*.css",
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
@ultim8k
ultim8k / markdown-syntax.md
Last active September 22, 2015 09:09
Markdown: Syntax
@ultim8k
ultim8k / twitter_to_medium.js
Created October 8, 2015 13:42
Visit Twitter user's Medium blog and vice versa
var url = window.location.href;
var unRE = /\/\@?(\w+)$/;
var userName = '';
var unMatch = url.match(unRE);
if (unMatch && unMatch.length) {
userName = (unMatch.length > 1) ? unMatch[1] : unMatch[0];
userName = userName.replace('/', '').replace('@', '');
}
var mediumMatch = url.match(/medium/);
var twitterMatch = url.match(/twitter/);
title tags
Tha last title you will ever need
web, magic, unicorns

#Just an amazing post Please don't tell mom

@ultim8k
ultim8k / nginx.conf
Created November 13, 2015 17:40 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ultim8k
ultim8k / phonetic_alpha.md
Last active November 14, 2015 13:25
Phonetic Alphabet

Phonetic Alphabet

  • A Alpha
  • B Bravo
  • C Charlie
  • D Delta
  • E Echo
  • F Foxtrot
  • G Golf
  • H Hotel
  • I India