Skip to content

Instantly share code, notes, and snippets.

View bantya's full-sized avatar
🎯
Focussing

Rahul Thakare bantya

🎯
Focussing
  • http://127.0.0.1:4200
  • http://127.0.0.1:8080
  • 23:14 (UTC -12:00)
  • X @rkkth
View GitHub Profile
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.pem with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@shaunitnishant
shaunitnishant / .java
Created December 19, 2018 13:25
MainActivity (With Video Enabled WebView)
package com.kknlive.kkn;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
@vasanthk
vasanthk / for-snook.md
Created December 16, 2018 20:37 — forked from threepointone/for-snook.md
For Snook

https://twitter.com/snookca/status/1073299331262889984?s=21

‪“‬In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”

‪Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows. ‬

‪(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)‬

So the big deal about css-in-js (cij) is selectors.

@sonOfRa
sonOfRa / mergetoolwrapper.sh
Last active August 29, 2022 09:57
Use Sublime Merge as a git mergetool
#!/bin/bash
# A wrapper script to make sublime_merge work more nicely
# when used as a git-mergetool
WORKDIR=`git rev-parse --show-toplevel`
REAL_HOME="$HOME/"
# Replace a leading homedir with ~/ to match the window title
REAL_WORKDIR=${WORKDIR/"^$REAL_HOME"/"~/"}
sublime_merge $REAL_WORKDIR
@matthewbdaly
matthewbdaly / init.vim
Last active January 31, 2024 16:34
My NeoVim config
let g:polyglot_disabled = ['markdown']
call plug#begin()
" Project
Plug 'ahmedkhalf/project.nvim'
" Search
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
@molcik
molcik / free-photoshop.md
Created May 18, 2018 08:39
Modify Photoshop to never ending trial

How Does It Work

All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:

cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT

Then you have to open the file and edit it. You can use just TextEdit app.

open -a TextEdit application.xml
@chamberlainpi
chamberlainpi / review_of_adamwathan_AVCD.md
Last active August 12, 2018 13:12
Pierre's review of Adam Wathan's "Advanced Vue Component Design"

Pierre's Review of
Adam Wathan's Advanced Vue Component Design

I've been using Vue for a little over a year now. It's my first "watchamacallit" framework (what's the name of these things anyways?) that I picked up, so I can't really form any comparison to AngularJS or React (other than they seem a bit more daunting to learn and use).

Anyhew, I'm hoping this review will help those who are hesitant to hit that "Buy 🛒" on Adam Wathan's video series!

Which can be found here btw...

@dublado
dublado / smtp.php
Last active February 18, 2019 15:08
old smtp sender php
<?php
//new function
$to = "dublado@ants.com.br";
$nameto = "Who To";
$from = "admin@justmarried.com.br";
$namefrom = "Who From";
$subject = "Hello World Again!";
$message = "World, Hello!";
authSendEmail($from, $namefrom, $to, $nameto, $subject, $message);
@adamwathan
adamwathan / 1-add-macros.php
Last active June 11, 2022 19:55
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider
@tpaksu
tpaksu / renew.sh
Created January 19, 2018 07:35
laragon refresh certificates
#!/bin/sh
CRTPATH=$(pwd -W)
for i in *.key ; do
DOMAIN=${i%.key}
cat << EOF > openssl_$DOMAIN.conf
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[req_distinguished_name]