Skip to content

Instantly share code, notes, and snippets.

@vishwassharma
vishwassharma / emulator-install-using-avdmanager.md
Last active February 3, 2020 06:10 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

@vishwassharma
vishwassharma / iterm2-solarized.md
Created July 27, 2018 17:37 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@vishwassharma
vishwassharma / gae_csv.py
Last active August 29, 2015 14:06 — forked from mattes/gae_csv.py
class InitCSVHandler(webapp2.RequestHandler):
def get(self):
fetched = self.request.get('fetched')
if not fetched:
self.response.write("no fetched date")
return
taskqueue.add(url='/create_csv', queue_name='csv', params={'fetched': fetched})
self.response.write("creating " + str(fetched))
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) {
$scope.$on('authLoaded', function() {
$scope.isExpert($scope.main.serieId);
$scope.isMember($scope.main.serieId);
});
$scope.loadAuth = function() {
Auth.load().success(function(data) {
$scope.main.user = data.user;
$scope.$broadcast("authLoaded");

Howto use ListFields in Django's admin

Problem

Consider this blog post model:

models.py

@vishwassharma
vishwassharma / nesting.js
Created May 29, 2012 03:10 — forked from geddski/nesting.js
helper function for nesting backbone collections.
function nestCollection(model, attributeName, nestedCollection) {
//setup nested references
for (var i = 0; i < nestedCollection.length; i++) {
model.attributes[attributeName][i] = nestedCollection.at(i).attributes;
}
//create empty arrays if none
nestedCollection.bind('add', function (initiative) {
if (!model.get(attributeName)) {
model.attributes[attributeName] = [];
@vishwassharma
vishwassharma / gist:2760011
Created May 21, 2012 00:13 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@vishwassharma
vishwassharma / example.js
Created May 15, 2012 20:21 — forked from bnoguchi/example.js
Example everyauth ajax password response
everyauth.password
.respondToLoginSucceed( function (res, user) {
if (user) { /* Then the login was successful */
res.json({ success: true }, 200);
}
})
.respondToLoginFail( function (req, res, errors, login) {
if (!errors || !errors.length) return;
return res.json({ success: false, errors: errors });
});
@vishwassharma
vishwassharma / gitconfig.ini
Created March 23, 2012 04:42
Git configuration shortcuts for URL's
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v