Skip to content

Instantly share code, notes, and snippets.

View alperg's full-sized avatar

Alper Gokcehan alperg

  • RTP, NC, United States
View GitHub Profile

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@alperg
alperg / StoreInViewModel.js
Created October 16, 2014 13:04
ExtJS 5 store in viewmodel
In file MyApp/store/Menu.js
Ext.define('MyApp.store.Menu', {
extend: 'Ext.data.Store',
requires: [
'MyApp.model.menu.Root'
],
model: 'MyApp.model.menu.Root',
@alperg
alperg / index.html
Last active November 9, 2015 18:32
Radios in timeline
<section class="survey">
<div class="wrapper">
<h2 class="title text-center">headline</h2>
<p class="intro text-center">text</p>
<form class="survey__form" action="#">
<!--<hr class="survey-hr"/>-->
<ul class="radio-list">
<li class="radio-list__radio-item">
<input class="radio-item__input" type="radio" name="radio-choice" id="radio-choice-1" value="choice-1"/>
@alperg
alperg / index.html
Last active November 9, 2015 18:34
Radios in timeline - 2
<div class="wrapper">
<h1>How well does your team use data?</h1>
<h5>Select the number that best applies</h5>
<form action="#">
<hr />
<div class="average">
<div class="line"></div>
<p>average</p>
</div>
<ul>
@alperg
alperg / index.html
Last active November 9, 2015 18:36
Simple calendar view
<table>
<thead>
<tr>
<th></th>
<th>Sun</th>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thu</th>
<th>Fri</th>
@alperg
alperg / index.html
Created November 9, 2015 18:43
HTML5 Simple Form
<heading>
<div class="wrapper">
<h1>asdf</h1>
<h2>qwerty</h2>
</div>
</heading>
<section>
<div class="wrapper">
<div class="form-row">
<label>Show Name</label>
@alperg
alperg / index.html
Created November 9, 2015 18:49
Location object
<h1>Location Object</h1>
<div class="search-bar" id="url">
<span id="origin"></span><span id="path"></span><span id="hash"></span>
</div>
<div class="container">
<a href="#home">home</a>
<a href="#about">about</a>
<a href="#portfolio">portfolio</a>
<div id="response"></div>
@alperg
alperg / AJAX Request with JavaScript.markdown
Last active November 9, 2015 18:59
AJAX Request with JavaScript - StackOverflow API

AJAX Request with JavaScript

This is a basic example of how to write an AJAX request with raw JavaScript. Or in other words, query an API and output the response onto a page. Here, we're using the StackOverflow API.

@alperg
alperg / index.html
Last active November 9, 2015 19:03
Github Search API
<h2>Github Search API</h2>
<input type="text" placeholder="Github Username" id="username">
<h3><button onclick="topLanguages()">Get Top Languages</button></h3>
<p>Top Languages Summary:</p>
<pre id="d"></pre>
<hr>
All Repos:
<pre id="a"></pre>
@alperg
alperg / index.html
Last active November 9, 2015 19:05
Github Search API
<h2>Github Search API</h2>
<input type="text" placeholder="Filename" id="term" onkeyup="updateUrl()">
<br>
<input type="text" placeholder="Username" id="username" onkeyup="updateUrl()">
<!--<input type="text" placeholder="Language" id="language">
<input type="text" placeholder="Filename" id="filename">
<input type="text" placeholder="Extension" id="Extension">-->
<h4 id="url">https://api.github.com/search/code?q=</h4>
<h4><button onclick="get()">GET /search/code</button></h4>
<p>Response:</p>