Skip to content

Instantly share code, notes, and snippets.

View sanjeevbishnoi's full-sized avatar
🎯
Focusing

Sanjeev Bishnoi sanjeevbishnoi

🎯
Focusing
  • Chandigarh
View GitHub Profile
[
{
"post_id": 1,
"title": "The everyday life of Bishnois:- Rituals and a culture of protests",
"author": "1",
"post_date": "30-04-2019",
"image_url": "",
"post_type": "youtube",
"description": "",
"link": "2T9xJSYfj6U",
@sanjeevbishnoi
sanjeevbishnoi / countdown_widget.dart
Created April 11, 2019 14:26
bug fixes for flutter Blur widget
import 'package:flutter/material.dart';
import 'package:frideos/frideos.dart';
import './custom/custom_blur_widget.dart';
import '../models/models.dart';
class CountdownWidget extends StatefulWidget {
const CountdownWidget(
{@required this.width, Key key, this.duration, this.triviaState})
@sanjeevbishnoi
sanjeevbishnoi / Route.js
Last active November 21, 2018 19:39
Eventmatch Package.json
import React from 'react'
import { connect } from 'react-redux';
import {
AsyncStorage, ImageBackground,
Text, TouchableOpacity, Image, View, StatusBar, Platform, Alert
} from 'react-native';
import { Router, Scene, Stack, NavigationBar, Title } from 'react-native-router-flux';
import Icon from 'react-native-vector-icons/dist/FontAwesome';
import { Actions, ActionConst } from 'react-native-router-flux';
import * as User from './actions/user';
@sanjeevbishnoi
sanjeevbishnoi / app.js
Created October 29, 2018 05:59
Electron JS main App.js file
import path from 'path'
import url from 'url'
import { app, crashReporter, BrowserWindow, Menu, globalShortcut } from 'electron'
const isDevelopment = (process.env.NODE_ENV === 'development')
let mainWindow = null
let forceQuit = false
var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
// Someone tried to run a second instance, we should focus our window.
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore();
@sanjeevbishnoi
sanjeevbishnoi / select_printer.js
Created October 29, 2018 05:45
To set the default printer out of list
import React, { Component } from 'react';
import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton';
import RaisedButton from 'material-ui/RaisedButton';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
const storage = require('electron-json-storage');
const styles = {
headline: {
fontSize: 24,
paddingTop: 16,
@sanjeevbishnoi
sanjeevbishnoi / videoview.xml
Last active October 26, 2018 13:05
Youtube Thumbnail UI
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:orientation="vertical"
app:cardBackgroundColor="@color/white"
@sanjeevbishnoi
sanjeevbishnoi / api.php
Last active October 26, 2018 12:02
Wordpress REST api file (without using any plugin)
<?php
//api/api.php?method=ForgotPassword
include('../wp-load.php');
class myapiclass {
public function commonGetData($postPerPage=NULL,$category=NULL,$post_type=NULL, $orderBy=NULL,$order=NULL,$notRequiredData=NULL,$status='publish'){
// echo $category." in common data";
public class DrawerActivity extends BaseActivity
implements NavigationView.OnNavigationItemSelectedListener,HomeFragment.OnItemClickListenerInFragment {
public FragmentManager fm;
@BindView(R.id.drawer_layout)
DrawerLayout drawer;
@BindView(R.id.toolbar)
Toolbar toolbar;
@BindView(R.id.nav_view)
@sanjeevbishnoi
sanjeevbishnoi / activity_main.xml
Last active October 26, 2018 10:07
Activity Layout File
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">