Skip to content

Instantly share code, notes, and snippets.

View sasasa671's full-sized avatar

Tev sasasa671

View GitHub Profile
View gist:cbeeb98d08c9247c58b2
import fileinput
import json
import csv
import sys
l = []
for line in fileinput.input():
l.append(line)
myjson = json.loads(''.join(l))
keys = {}
View jsbin.ulukep.html
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="http://builds.emberjs.com.s3.amazonaws.com/ember-1.0.0-rc.6.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
@aaronksaunders
aaronksaunders / controllers.js
Last active November 9, 2018 04:51
Accessing MongoDB Example Ionic Framework - based on hello sample
View controllers.js
angular.module('starter.controllers', [])
.controller('DashCtrl', function ($scope) {
})
.controller('FriendsCtrl', function ($scope, Friends) {
Friends.init()
.then(function (_data) {
console.log(_data.data.deployment_id);
Friends.all().then(function (_data) {
@iksose
iksose / restAPI.markdown
Last active September 21, 2023 06:39
Creating a REST API using Node.js, Express, and MongoDB
View restAPI.markdown

###Creating a REST API using Node.js, Express, and MongoDB

####Installing Node.js

Go to http://nodejs.org, and click the Install button. Run the installer that you just downloaded. When the installer completes, a message indicates that Node was installed at /usr/local/bin/node and npm was installed at /usr/local/bin/npm. At this point node.js is ready to use. Let’s implement the webserver application from the nodejs.org home page. We will use it as a starting point for our project: a RESTful API to access data (retrieve, create, update, delete) in a wine cellar database.

Create a folder named nodecellar anywhere on your file system. In the wincellar folder, create a file named server.js.