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

#Generate a certificate authority certificate and key.
openssl req -new -x509 -days <duration> -extensions v3_ca -keyout ca.key -out ca.crt
#Server
- Generate a server key.
openssl genrsa -des3 -out server.key 2048
@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))
function b(a){return a?(a^Math.random()*16>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)}
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 / .htaccess
Last active December 23, 2015 15:09
Django Hosting
AddHandler fcgid-script .fcgi
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^static/(.*)$ static/$1 [QSA,L]
RewriteCond %{REQUEST_URI} !(myproject.fcgi)
RewriteRule ^(.*)$ myproject.fcgi/$1 [QSA,L]
@media screen and (min-width: 1600px)
.contr
width: 100%
@media screen and (min-width: 1900px)
.contr
width: 100%
@vishwassharma
vishwassharma / get_yocto.sh
Last active December 19, 2015 09:48
Getting started with Yocto ...
#I like to work in home bin directory
cd $HOME/bin
#Get the source code
wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.4/poky-dylan-9.0.0.tar.bz2
#Extract the files into the corresponding directory
tar xvf poky-dylan-9.0.0.tar.bz2
cd poky-dylan-9.0.0