Skip to content

Instantly share code, notes, and snippets.

Anmol Agrawal anmolonruby

Block or report user

Report or block anmolonruby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anmolonruby
anmolonruby / sketch-never-ending.md
Created Apr 29, 2018 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial
View sketch-never-ending.md

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
View class_etiquette.md

Good etiquette in class can help you make the most of your education.

You're an adult; act like one.

If you're in Code Fellows, you're likely at least 18 years old—the age at which you're legally considered an adult. You may not feel like a responsible grown-up yet, but your instructors will assume that you are. So act likewise.

Before you say or do anything in the classroom, ask yourself "How would a mature, well-adjusted, courteous adult act?" I promise that doing so will save you from embarrassment and engender the respect of your classmates and instructors.

Present yourself well.

@anmolonruby
anmolonruby / symbols.md
Created Apr 14, 2017 — forked from ryansobol/symbols.md
Symbols in Ruby
View symbols.md

What's a Symbol and why is it imporant?

In Ruby, a Symbol is the most efficient way, in terms of time and memory, to represent a set of characters.

What does a Symbol look like?

Most commonly, a Symbol is a single word prefixed by a colon:

:hello
@anmolonruby
anmolonruby / hashes.md
Created Apr 14, 2017 — forked from ryansobol/hashes.md
Hashes in Ruby
View hashes.md

What's a Hash and why is it important?

A Hash is a collection of key-value pairs. To add, fetch, modify, and delete a value from a Hash, you refer to it with a unique key.

While an Array is indexed by Integers only, a Hash is keyed by any object -- Strings, Integers, etc.

In other programming languages, a Hash might be known as an 'associative array', 'dictionary', or 'HashMap'.

What does a Hash look like?

@anmolonruby
anmolonruby / gist:0f4b72e0a715ce2b6ef2e51bffa2734b
Created Apr 14, 2017 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview
View gist:0f4b72e0a715ce2b6ef2e51bffa2734b

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@anmolonruby
anmolonruby / tweet_dumper.py
Created Feb 6, 2017 — forked from yanofsky/tweet_dumper.py
A script to download all of a user's tweets into a csv
View tweet_dumper.py
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
View sw-install.js
function requestUpdate(sw) {
const shouldUpdate = window.confirm('New version available. Update?');
if (shouldUpdate) {
sw.postMessage({ shouldUpdate: true });
}
}
function checkStateForInstalled(sw) {
sw.addEventListener('statechange', () => {
if (sw.state === 'installed') {
@anmolonruby
anmolonruby / e-commerce.md
Created Dec 23, 2016 — forked from hjr3/e-commerce.md
Examples of RESTful API calls for E-commerce platforms
View e-commerce.md

Examples of RESTful API calls for E-commerce platforms

These examples are type 3 RESTful API requests and responses. The JSON-HAL specification is used to implement HATEOAS.

Some of the examples are based on my work as architect of the RESTful API at http://www.hautelook.com. All proprietary information has been removed.

Relevant links

@anmolonruby
anmolonruby / index.html
Created Jan 25, 2016
PubNub - RethinkDB Demo
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>RethinkDB PubNub</title>
<script src="index.js" charset="utf-8"></script>
<script src="https://cdn.pubnub.com/pubnub-3.7.13.min.js"></script>
<script src="jquery.js" charset="utf-8"></script>
<style>
@anmolonruby
anmolonruby / index.html
Created Jan 25, 2016
PubNub - ISS Demo
View index.html
<html>
<head>
<meta charset="UTF-8">
<title>ISS PubNub demo</title>
<script src="https://cdn.pubnub.com/pubnub-3.7.13.min.js"></script>
<script src="jquery.js" charset="utf-8"></script>
<!-- mapbox CDN -->
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.css' rel='stylesheet' />
You can’t perform that action at this time.