Skip to content

Instantly share code, notes, and snippets.

View CoVariantExample.kt
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 / Card1
Last active Apr 8, 2021
Anki Vocabulary Template for learning English Words along with Sentence
View Card1
// Front Template
<span id="image"> {{Image}} </span>
<button type="button" onClick="clickeme()" >Hint</button>
<a href="{{text:Word}}&l=pa">Punjabi</a>
View # Install KeePass 2
# Install KeePass 2
sudo apt-get install -y keepass2
# Install KeePassHTTP
cd $HOME
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 / singl.html
Created May 18, 2018
TOC values to allow h1
View singl.html
{% 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
View Android dependencies
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'
View enqueue_functions.php
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 );
View Wprocket Correct HTTPS domain specific
# Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
View Carleton_ieee_redirect.js
// ==UserScript==
// @name Carleton_ieee_redirect
// @namespace
// @version 0.1
// @description This redirects ieee page to carleton university proxy page
// @match*
// @copyright 2017, Ranjit Singh Saini
// @run-at document-start
// ==/UserScript==
View Quick_paste_in_Evernote_Ahk.Ahk
#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}