Skip to content

Instantly share code, notes, and snippets.

View vianhanif's full-sized avatar
🚀
{do} {things}

Alvian Rahman Hanif vianhanif

🚀
{do} {things}
  • Depok, Indonesia
View GitHub Profile
@vianhanif
vianhanif / complex-table.html
Created September 21, 2016 12:10
complex table example
<table class="table table-striped">
<thead>
<tr>
<th>No</th>
<th colspan="2" scope="colgroup">Provinsi</th>
<th colspan="2" scope="colgroup">Kabupaten</th>
<th>Bencana</th>
<th colspan="2">Waktu Kejadian</th>
</tr>
<tr>
@vianhanif
vianhanif / image-transition.scss
Created September 22, 2016 14:00
image scale transitions
.article-heading{
background-position: center !important;
background-repeat: no-repeat !important;
background-size: cover !important;
height: $article-panel-height; // ex: 100px
transition: all .3s ease-in-out;
&:hover{
transform: scale(1.2);
}
}
@vianhanif
vianhanif / drop-shadow-transition.html
Last active September 27, 2016 16:07
drop shadow transitions
<div class="panel-article">
<!-- content -->
</div>
@vianhanif
vianhanif / inline-react-condition.jsx
Created September 27, 2016 03:37
inline react condition
const Item = React.createClass({
render: function(){
return(
<div>
{(()=>{
// if-else, switch, while, any condition
})()}
</div>
);
}
@vianhanif
vianhanif / edit-navbar-collapse-bootstrap.scss
Created September 27, 2016 16:07
custom bootatrp navbar coolapse breakpoint
@media (max-width: 1136px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
}
.navbar-toggle {
display: block;
}
@vianhanif
vianhanif / text-line-clamping.scss
Last active September 29, 2016 04:17
clamp line text
.text-style{
display: block; /* Fallback for non-webkit */
display: -webkit-box;
line-height: 1.4;
-webkit-line-clamp: 10; // line count to show
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
overflow: hidden;
color: tint($accent, 30%);
@vianhanif
vianhanif / form-validation-bootstrap-tab.html
Last active November 30, 2022 07:35
Custom form validation with Bootstrap 3 Tab navigation
<form class="form" action="#some-action">
<ul class="nav nav-tabs " role="tablist" id="tabs">
<li role="presentation" class="active">
<a class="Profil" href=".Profil" aria-controls="Profil" role="tab" data-toggle="tab">Profil</a>
</li>
<li role="presentation" class="">
<a class="Kontak" aria-controls="Kontak" role="tab" data-toggle="tab">Kontak</a>
</li>
<li role="presentation" class="">
<a class="Paspor" aria-controls="Paspor" role="tab" data-toggle="tab">Paspor</a>
@vianhanif
vianhanif / Jarvis.py
Created November 4, 2016 03:52 — forked from GGulati/Jarvis.py
import speech_recognition
import pyttsx
speech_engine = pyttsx.init('sapi5') # see http://pyttsx.readthedocs.org/en/latest/engine.html#pyttsx.init
speech_engine.setProperty('rate', 150)
def speak(text):
speech_engine.say(text)
speech_engine.runAndWait()
@vianhanif
vianhanif / index.html
Created February 4, 2017 13:16
sample login page with bootstrap
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
@vianhanif
vianhanif / gist:674cca35748ee8faeb6d31316a461ae0
Created February 15, 2017 06:19 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*