Skip to content

Instantly share code, notes, and snippets.

Dinesh Bhosale dineshbhosale

Block or report user

Report or block dineshbhosale

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dineshbhosale
dineshbhosale / random.dart
Created Apr 30, 2018 — forked from damondouglas/random.dart
Generate Random String based on length
View random.dart
import 'dart:math';
String _randomString(int length) {
var rand = new Random();
var codeUnits = new List.generate(
length,
(index){
return rand.nextInt(33)+89;
}
);
@dineshbhosale
dineshbhosale / letsencrypt-nginx-centos.md
Created Apr 24, 2018 — forked from masasdani/letsencrypt-nginx-centos.md
letsencyript SSL nginx proxy centos 7
View letsencrypt-nginx-centos.md

Install Letsencrypt Nginx Centos 7

install certbot

  sudo yum install epel-release
  sudo yum update
  sudo yum install certbot

install nginx

  sudo yum install nginx
  sudo systemctl start nginx
@dineshbhosale
dineshbhosale / nginx.conf
Created Apr 3, 2018 — forked from calebwoods/nginx.conf
Sample Nginx config for deployment of Angular.js app
View nginx.conf
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
View gist:bc478b99b0028b6716d9148869ee6d58
cmdStr := "thumbnail.sh " + url
cmd := exec.Command("/bin/sh", "-c", cmdStr)
_, err := cmd.Output()
if err != nil {
println(err.Error())
return
}
@dineshbhosale
dineshbhosale / iterm.sh
Last active Sep 3, 2016 — forked from sushihangover/iterm
Passing commands using arguments in iTerm, usage : ./iterm.sh "vim"
View iterm.sh
#!/bin/bash
read -r -d '' script <<'EOF'
on run argv
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Default"
tell the last session
repeat with arg in argv
You can’t perform that action at this time.