This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| # View abbreviated SHA, description, and history graph of the latest 20 commits | |
| l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
| # View the current working tree status using the short format | |
| st = status | |
| br = branch | |
| co = checkout | |
| # Rebases with a remote branch- git rebase-with upstream remote-branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const header = document.getElementsByClassName('header')[0]; | |
| const statusElem = document.getElementById('status-txt'); | |
| const listener = ({ status }) => { | |
| const emoji = status === 'normal' ? '🙄' : '😝'; | |
| statusElem.innerText = `${status.replace(/-/g, ' ').toUpperCase()} ${emoji}`; | |
| }; | |
| ScrollToStick.applyScrollToStick('header-wrap', header.offsetHeight, { listener }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| const header = document.getElementsByTagName('header')[0]; | |
| // the offsetHeight determines how much of header wrap gets hidden with scroll | |
| ScrollToStick.applyScrollToStick('header-wrap', header.offsetHeight); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="header-wrap" class="header-wrap"> | |
| <header> # <--- this will get hidden while scrolling downwards | |
| <div class="logo"></div> | |
| <div class="brand-title"></div> | |
| </header> | |
| <div class="menu-strip"> # <--- this menu strip or tab like menu will be visible while scrolling downwards | |
| <div class="menu-item"></div> | |
| <div class="menu-item"></div> | |
| <div class="menu-item"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SwimMixin { | |
| // prevents duplication of implementation; | |
| // can be a helper/util class as well | |
| swim(context) { | |
| // swim implementation | |
| } | |
| } | |
| class Animal { | |
| walk() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- include scrolltostick --> | |
| <script src="vendors/scroll-to-stick/dist/scroll.to.stick.js"></script> | |
| <!-- or as npm module --> | |
| <script> | |
| import {applyScrollToStick} from 'scroll-to-stick'; | |
| </script> | |
| <!-- in react --> | |
| <script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.airasia.samples.codeorder; | |
| import java.awt.color.CMMException; | |
| import java.awt.color.ColorSpace; | |
| /** | |
| * A recommended approach to organize your code flow | |
| */ | |
| public class CodeSample { | |
| /* Properties */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import React, { Component } from 'react'; | |
| import classNames from 'classnames'; | |
| import { eventName, eventTime, eventStatus, getTitle } from './DockListHelpers'; | |
| import './EventList.css'; | |
| function EventItem(eventItem: DockData, eventTitle: string): ReactComponent { | |
| return ( | |
| <li | |
| className="EventList-item admin-page-list-item" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| server_name example.com www.example.com; | |
| listen [::]:443 ssl ipv6only=on; | |
| listen 443 ssl; | |
| ssl_certificate /your_cert_path/fullchain.pem; | |
| ssl_certificate_key /your_cert_path/privkey.pem; | |
| include /etc/letsencrypt/options-ssl-nginx.conf; | |
| ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; | |
| location / { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is a simple sample of how an event pool like thing can work as delegator | |
| // between angular and react world; where both are co-existing. | |
| // The goal is to let react component know whenever something gets broadcasted | |
| // or emitted in angular $scope, without sharing/injecting angular specific code into it. | |
| // EventPool.js | |
| class EventPool { | |
| constructor() { | |
| this._eventsMap = {}; | |
| } |