Skip to content

Instantly share code, notes, and snippets.

Avatar

Jaydeep Solanki jaydp17

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jaydp17 on github.
  • I am jaydp17 (https://keybase.io/jaydp17) on keybase.
  • I have a public key ASBKlOwLUwjtzzkbgFPATsDdC-rt1IaiXsdi612ryZFnhQo

To claim this, I am signing this object:

@jaydp17
jaydp17 / build.gradle
Created Oct 30, 2015
Kotlin and dataBinding
View build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.mvptestkotlin"
@jaydp17
jaydp17 / diskSpace.sh
Last active Aug 29, 2015
A command to see which folder/files are eating up the disk space
View diskSpace.sh
sudo du -d 5 -h -x / | grep '^\s*[0-9\.]\+G'
View dummylayout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="512dp"
android:layout_height="512dp"
View DummyActivity.java
public class DummyActivity extends ActionBarActivity {
File f;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dummylayout);
@jaydp17
jaydp17 / barebone_mors.js
Created Dec 31, 2014
A simple server using mors
View barebone_mors.js
var mors = require('mors'),
mosca = require('mosca'),
app = mors();
app.all('*', function (req, res, next) {
res.topic(req.topic).publish(req.payload);
});
var ascoltatore = {
//using ascoltatore
@jaydp17
jaydp17 / barebone_mosca.js
Last active Dec 10, 2015
A simple server using mosca
View barebone_mosca.js
var mosca = require('mosca')
var ascoltatore = {
//using ascoltatore
type: 'mongo',
url: 'mongodb://localhost:27017/mqtt',
pubsubCollection: 'ascoltatori',
mongo: {}
};
View abc.md

Openshift

To manage openshift apps we'll be using rhc.

Setup rhc

Follow the first 3 steps from here

Creating a rails app

View gist:e11783abf8bea414873a
require.config({
baseUrl : "bower_components/codemirror",
});
require(['lib/codemirror', 'addon/hint/show-hint'], function(CodeMirror, sh) {
console.log(CodeMirror.defaults);
console.log(CodeMirror.showHint);
});
@jaydp17
jaydp17 / 0_reuse_code.js
Created Jan 26, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console