Skip to content

Instantly share code, notes, and snippets.

View ozthekoder's full-sized avatar

osman ozdemir ozthekoder

View GitHub Profile
<select name="nationality">
<option value="">-- select one --</option>
<option value="afghan">Afghan</option>
<option value="albanian">Albanian</option>
<option value="algerian">Algerian</option>
<option value="american">American</option>
<option value="andorran">Andorran</option>
<option value="angolan">Angolan</option>
<option value="antiguans">Antiguans</option>
<option value="argentinean">Argentinean</option>
<select>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
//
// 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
  1. You have Ghostscript installed, right? Otherwise sudo apt-get install ghostscript
  2. This is important and installs the headers (iapi.h etc) which are required but don't come with the default Ghostscript package: sudo apt-get install libgs-dev
  3. I also needed sudo apt-get install gs-esp
  4. For me the pre compiled version of ImageMagick never accepted Ghostscript, so let's remove it: sudo apt-get --purge remove imagemagick
  5. Get the source of ImageMagick, untar it, cd ImageMagick-xx
  6. ./configure --with-gslib=yes [and what else you need]
  7. Confirm in the output near the bottom gslib yes yes and not gslib yes no
  8. make
  9. make install
  10. Run convert -list configure | grep DELEGATES => DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib
" general
m = mark position (eg ma then 'a will go back to that position)
cW/cw = change word
cB/cb = change till begining of word
C = change till end of line (delete from curser to end and go into insert mode)
A = insert at end of line
dd = del line
D = delete till end of line
I = go into insert mode at begining of line (before first non-whitespace chars)
L = goto bottom of screen
@ozthekoder
ozthekoder / The Technical Interview Cheat Sheet.md
Created January 23, 2016 14:01 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
document.onclick= function(event) {
if (event===undefined) event= window.event; // IE hack
var target= 'target' in event? event.target : event.srcElement; // another IE hack
var root= document.compatMode==='CSS1Compat'? document.documentElement : document.body;
var path= '//' + getPathTo(target);
console.log(path);
}
function getPathTo(element) {
@ozthekoder
ozthekoder / .vimrc
Last active November 12, 2017 23:59
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'L9'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'scrooloose/nerdtree'
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
export default class ProxyRenderer extends Component {
constructor(props) {
super(props);
this.container = null;
this.proxy = null;
this.state = { active: false };
@ozthekoder
ozthekoder / theme.js
Last active September 24, 2017 14:09
{
"palette": {
"canvasColor": "#5d4037",
"primary1Color": "#ffb300",
"primary2Color": "#ffb300",
"primary3Color": "#ff7043",
"accent1Color": "#f57f17",
"accent2Color": "#4e342e",
"accent3Color": "#ffa000",
"textColor": "#ffee58",