Skip to content

Instantly share code, notes, and snippets.

View netsmertia's full-sized avatar

Natwar Singh netsmertia

View GitHub Profile
@netsmertia
netsmertia / bootstrap_viewport_size_indicator.html
Created August 12, 2020 14:55
Bootstrap Resize Indicator
<div style="
position: fixed;
top: 90%;
left: 50%;
z-index: 10000;
transform: translate(-50%, -50%);
background: rgba(247, 201, 241, 0.5);
padding: 20px;
border-radius: 30px;
">
class DownloadProgressIndicator extends StatelessWidget {
DownloadProgressIndicator({
this.color =Colors.blue,
this.backgroundColor = Colors.black12,
this.content,
this.value,
this.strokeWidth = 4.0,
});
@netsmertia
netsmertia / imageScaleAndRotate.dart
Last active May 24, 2020 13:40
image rotate and scale
import 'dart:async';
import 'dart:math';
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/services.dart' show rootBundle;
import 'package:flutter/material.dart' hide Image;
void main() => runApp(new MyApp());
@netsmertia
netsmertia / main.dart
Created May 4, 2018 13:53
flutter image drawing in canvas
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
import 'package:flutter/services.dart' show rootBundle;
import 'dart:async';
import 'dart:typed_data';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@netsmertia
netsmertia / android_seekbar_min_max.java
Last active November 5, 2016 03:15
Seekbar setMax
//You cannot set the min value of a SeekBar (always 0) and you cannot set the step value of a SeekBar (always 1).
//If you want to set the value from 60 to 180 with a step of 1 this is the way to do it
//From http://stackoverflow.com/questions/20762001/how-to-set-seekbar-min-and-max-value
int step = 1;
int max = 180;
int min = 60;
// Ex :
@netsmertia
netsmertia / 0_reuse_code.js
Created November 4, 2016 15:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@netsmertia
netsmertia / List_lan_users
Last active August 29, 2015 14:18
How to list all computers in a windows wi-fi network?
Well I have used following procedure usually:
Go To RUN
Write CMD
Ping the server if you know or your gateway. Even if there is requested timed out.
type "arp -a "
It will usually list down all the IP's and Computers with their Mac Addresses
If you want to use GUI one tool I recommend is : IPScan form http://www.eusing.com/ipscan/free_ip_scanner.htm
Although it a light application 433KB almost but a freeware and very effective and always work for me. 100 % result!
@netsmertia
netsmertia / preview.js
Created October 5, 2014 19:24
Preview Image before uploading
$('#image-browse-button').change(function() {
previewImage(this);
});
function previewImage(input) {
if(input.files && input.files[0]) {
var reader= new FileReader(),
image = new Image();
reader.onload = function(_file) {
image.src = _file.target.result;
@netsmertia
netsmertia / gitREADS.md
Created September 7, 2014 17:06
gitREADS

Some git command that I read/learn while facing some kind of problem or looking for something different.

####Reset all changes after last commit

$ git reset HEAD --hard
@netsmertia
netsmertia / gulpfile.js
Last active March 10, 2017 13:05
BasicGulpFile
//Basic gulpfile.js with sass, jade, browser-sync and desktop notification
var gulp = require('gulp');
var sass = require('gulp-sass');
var rename = require('gulp-rename');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync');
var jade = require('gulp-jade');