Skip to content

Instantly share code, notes, and snippets.

View rizkysyazuli's full-sized avatar

Rizky Syazuli rizkysyazuli

View GitHub Profile
@rizkysyazuli
rizkysyazuli / apache-commands.sh
Last active February 21, 2020 11:27
[Shell - Apache Commands] #ubuntu #centos #apache
# Ubuntu
sudo service apache2 start
sudo service apache2 stop
sudo service apache2 restart
# CentOS 7.x or newer
sudo systemctl start httpd.service
sudo systemctl stop httpd.service
sudo systemctl restart httpd.service
@rizkysyazuli
rizkysyazuli / idr-check.js
Last active February 21, 2020 05:55
[Bookmarklet - Bitcoin.co.id] Get estimate values of your crypto currency portfolio in Rupiah. Probably no longer works. #bookmarklets
/*
* Author: Rizky Syazuli <br4inwash3r@gmail.com>
* This code snippet is used to show live IDR estimate of your crypto assets in Bitcoin.co.id
* Used as a bookmarklet. Go here to do convert any JS snippets into a bookmarklet: https://bookmarkify.it
*/
if (window.location.href !== 'https://vip.bitcoin.co.id/market') {
alert(`Your're not in VIP spot market page`);
}
@rizkysyazuli
rizkysyazuli / mixins-size.scss
Last active February 20, 2020 16:14
[SCSS - Sizing] #scss
@mixin size($width, $height: $width) {
width: $width;
height: $height;
}
@rizkysyazuli
rizkysyazuli / mixins-positioning.scss
Last active February 20, 2020 16:14
[SCSS - Positioning] #scss
@mixin position($position, $args) {
@each $o in top right bottom left {
$i: index($args, $o);
@if $i and $i + 1 &lt;= length($args) and type-of(nth($args, $i + 1)) == number {
#{$o}: nth($args, $i + 1);
}
}
position: $position;
}
@rizkysyazuli
rizkysyazuli / mixins-css-triangle.scss
Last active February 20, 2020 16:13
[SCSS - Triangle] #scss
@mixin css-triangle($triangle-size, $triangle-color, $triangle-direction) {
content: "";
display: block;
width: 0;
height: 0;
border: inset $triangle-size;
@if ($triangle-direction == top) {
border-color: $triangle-color transparent transparent transparent;
border-top-style: solid;
@rizkysyazuli
rizkysyazuli / mixins-clearfix.scss
Last active February 20, 2020 16:13
[SCSS - Clearfix] #scss
@mixin clearfix {
*zoom:1;
&:before, &:after { content: " "; display: table; }
&:after { clear: both; }
}
@rizkysyazuli
rizkysyazuli / script.js
Last active February 20, 2020 16:10
[JavaScript - SPA Starter] Starter script for a single-page AJAX application.
/**
* Extending Paul Irish’s DOM-ready execution for single-page AJAX application.
* This snippet executes methods based on URL hash values.
*
* Original implementation by Paul Irish & Viget Labs: http://bit.ly/aEwAny
* Requires jQuery Address plugin: http://bit.ly/11wNxa
*
* TODO: support HTML5 History API.
*
*/
@rizkysyazuli
rizkysyazuli / index.jade
Last active February 20, 2020 16:09
[Jade - Starter HTML] Starter Jade template with Foundation #html #jade #foundation
doctype 5
// paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
//if IE 8
<html class="no-js lt-ie9" lang="en">
//[if gt IE 8]><!
html(class="no-js", lang="en")
//<![endif]
head
@rizkysyazuli
rizkysyazuli / .editorconfig
Last active February 20, 2020 16:06
[Dotfiles - WP Theme Dev Settings] Contains rules for EditorConfig, stylelint, ESLint, and PHP_CodeSniffer that follows WordPress coding standards. Uses and Gulp + BrowserSync for auto reload. #wordpress #development #linter #dotfiles
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
@rizkysyazuli
rizkysyazuli / responsive-embeds.html
Last active February 20, 2020 16:01
[HTML - Responsive Embeds] #html #responsive #video
<!-- YouTube & Vimeo -->
<style>
.embed-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
max-width: 100%;
height: auto;