Skip to content

Instantly share code, notes, and snippets.

View arunabhdas's full-sized avatar
🤯
Coding

Arunabh Das arunabhdas

🤯
Coding
View GitHub Profile
@arunabhdas
arunabhdas / happy_git_on_osx.md
Created February 26, 2019 23:35 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@arunabhdas
arunabhdas / happy_git_on_osx.md
Created February 26, 2019 23:35 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@arunabhdas
arunabhdas / Simple Alamofire Calls in Swift 4
Created January 16, 2019 04:08 — forked from cmoulton/Simple Alamofire Calls in Swift 4
Simple Alamofire Calls in Swift 4
import Alamofire
func makeGetCallWithAlamofire() {
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1"
Alamofire.request(todoEndpoint)
.responseJSON { response in
// check for errors
guard response.result.error == nil else {
// got an error in getting the data, need to handle it
print("error calling GET on /todos/1")
@arunabhdas
arunabhdas / URLSession Calls in Swift 4
Created January 16, 2019 04:01 — forked from cmoulton/URLSession Calls in Swift 4
URLSession Calls in Swift 4
func makeGetCall() {
// Set up the URL request
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1"
guard let url = URL(string: todoEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = URLRequest(url: url)
// set up the session
@arunabhdas
arunabhdas / svg2png.py
Created December 4, 2018 22:10 — forked from thomir/svg2png.py
Various ways to convert SVG -> PNG
#!/usr/bin/env python
"""Convert an SVG file to a PNG file."""
from argparse import ArgumentParser
import subprocess
import os.path
def main():
@arunabhdas
arunabhdas / webpack.config.js
Created February 4, 2018 05:45 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : false,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@arunabhdas
arunabhdas / prod.js
Created September 14, 2015 06:10
tasks/register/prod.js
// Commented the call to cssmin as folows
/*
grunt.registerTask('prod', [
'compileAssets',
'concat',
'uglify',
'cssmin',
'sails-linker:prodJs',
'sails-linker:prodStyles',
'sails-linker:devTpl',