Skip to content

Instantly share code, notes, and snippets.

open class FLower(){
}
class Rose: FLower(){}
//A garden has flowers.
open class Garden<out T: FLower>(){
val flowers: List<T> = listOf()
fun pickFlower(i: Int ):T = flowers[i]
@1nsp1r3rnzt
1nsp1r3rnzt / Card1
Last active April 8, 2021 02:56
Anki Vocabulary Template for learning English Words along with Sentence
// Front Template
{{Word}}
<br>
<span id="image"> {{Image}} </span>
<br>
<button type="button" onClick="clickeme()" >Hint</button>
<br>
<a href="http://www.shabdkosh.com/pa/translate?e={{text:Word}}&l=pa">Punjabi</a>
# Install KeePass 2
sudo apt-get install -y keepass2
# Install KeePassHTTP
cd $HOME
wget https://raw.github.com/pfn/keepasshttp/master/KeePassHttp.plgx
sudo mv KeePassHttp.plgx /usr/lib/keepass2
sudo apt-get install -y mono-complete
sudo apt-get install -y libmono-system-xml-linq4.0-cil libmono-system-data-datasetextensions4.0-cil libmono-system-runtime-serialization4.0-cil mono-mcs
@1nsp1r3rnzt
1nsp1r3rnzt / singl.html
Created May 18, 2018 01:01
TOC values to allow h1
{% include toc.html sanitize=true html=content h_min=1 h_max=2 class="toc__menu" %}
hard coded values in minimal mistake theme to change toc
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.jakewharton.timber:timber:4.7.0'
implementation 'pub.devrel:easypermissions:1.2.0'
flush_rewrite_rules( false );
add_action( 'transition_post_status', 'on_all_status_transitions', 10, 3 );
function my_assets() {
wp_enqueue_style( 'theme-style', get_stylesheet_uri(), array( 'reset' ) );
wp_enqueue_style( 'reset', get_stylesheet_directory_uri() . '/reset.css' );
wp_enqueue_script( 'owl-carousel', get_stylesheet_directory_uri() . '/owl.carousel.js', array( 'jquery' ) );
wp_enqueue_script( 'theme-scripts', get_stylesheet_directory_uri() . '/website-scripts.js', array( 'owl-carousel', 'jquery' ), '1.0', true );
}
# Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?codehealthy.com$
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
// ==UserScript==
// @name Carleton_ieee_redirect
// @namespace http://codehealthy.com/
// @version 0.1
// @description This redirects ieee page to carleton university proxy page
// @match http://ieeexplore.ieee.org/document/*
// @copyright 2017, Ranjit Singh Saini
// @run-at document-start
// ==/UserScript==
@1nsp1r3rnzt
1nsp1r3rnzt / Quick_paste_in_Evernote_Ahk.Ahk
Created January 31, 2017 00:57
Quick Paste in Evernote
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
`::
#IfWinExist ahk_class ENMainFrame
WinActivate ,ahk_class ENMainFrame
send {enter}