Skip to content

Instantly share code, notes, and snippets.

View vinayakkulkarni's full-sized avatar
:octocat:
Gitting it done (from 🏡)

Vinayak Kulkarni vinayakkulkarni

:octocat:
Gitting it done (from 🏡)
View GitHub Profile
@vinayakkulkarni
vinayakkulkarni / timezone.html
Last active February 6, 2020 21:45
TimeZone Snippet for Semantic-UI
<!-- Make sure you have Semantic-UI libs include
Also, Ensure you import jQuery for smooth transition
Once you have all the imports add this to your html:
<script type="text/javascript">
$(document).ready(function() {
$('.dropdown').dropdown();
$('.ui.checkbox').checkbox();
});
</script>
@vinayakkulkarni
vinayakkulkarni / countries.html
Created September 27, 2016 11:37
Countries dropdown snippet in Semantic-UI format ( ISO-3366-1: Alpha-2 Codes )
<!-- Make sure you have Semantic-UI libs include
Also, Ensure you import jQuery for smooth transition
Once you have all the imports add this to your html:
<script type="text/javascript">
$(document).ready(function() {
$('.dropdown').dropdown();
$('.ui.checkbox').checkbox();
});
</script>
-->
@vinayakkulkarni
vinayakkulkarni / currency.html
Created October 17, 2016 10:14
Currencies in Semantic-UI
<!-- Make sure you have Semantic-UI libs include
Also, Ensure you import jQuery for smooth transition
Once you have all the imports add this to your html:
<script type="text/javascript">
$(document).ready(function() {
$('.dropdown').dropdown();
});
</script>
-->
<div class="field">
@vinayakkulkarni
vinayakkulkarni / thehtml.html
Last active December 23, 2016 05:33
Greet according to the time. Set default as afternoon.
<h1 class="gradient-text">
<span>Good afternoon.</span><br>
How can we help you today?
</h1>
@vinayakkulkarni
vinayakkulkarni / withinexampleTest.php
Created December 27, 2016 12:55
Using within() to limit DOM search for link click()
$this->visitRoute('history.index')
->within('th a', function() { $this->click('Register'); })
->seeRouteIs('history.index', ['sort' => '5', 'sorttype' => 'asc']);
@vinayakkulkarni
vinayakkulkarni / validation.js
Created March 21, 2017 09:38
Validation.js
/*
***************************************************************************************************
The following methods are implemented in this file
1. function Blanks_Validation(sValue)
2. function IsPure_Numeric(sValue)
3. function IsNumeric(sValue)
4. function IsValid_US_Phone_Or_Fax(sValue)
5. function IsAlpha_Numeric(sValue)
6. function IsValid_Email(sValue)
console.table($x('ancestor-or-self::*',$0).map(e=>({e,zIndex:getComputedStyle(e).zIndex})))
@vinayakkulkarni
vinayakkulkarni / rating.vue
Last active July 29, 2017 22:20
Vue + Semantic-UI Rating
Vue.component('rating', {
template: `<div class="ui star rating" :data-rating="value"></div>`,
props: ['value'],
watch: {
value: function (val, oldVal) {
if (val == null) {
$(this.$el).rating('clear rating');
}
}
},
<template>
<div class="ui container stackable grid">
<div class="sixteen wide column" v-if="this.loading">
<div class="ui segment" style="height:200px;">
<div class="ui inverted dimmer" :class="{active: loading}">
<div class="ui text large loader">Loading</div>
</div>
</div>
</div>
<div class="eight wide column" v-if="!this.loading">
@vinayakkulkarni
vinayakkulkarni / launch_visual_studio_code_from_terminal.markdown
Created August 21, 2017 14:22
launch_visual_studio_code_from_terminal

Launch Visual Studio Code from the macOS Terminal

Visual Studio Code ships with a CLI called code. This utility is hidden in the following folder (assuming you installed Visual Studio Code in /Applications like normal folk. If this following line opens Visual Studio Code for you, then bingo, you're ready.

open /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code

You can find more (official) details about code here