One of my colleagues shared an article on writing (good) Git commit messages today: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
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
| var docWidth = document.documentElement.offsetWidth; | |
| [].forEach.call( | |
| document.querySelectorAll('*'), | |
| function(el) { | |
| if (el.offsetWidth > docWidth) { | |
| console.log(el); | |
| } | |
| } | |
| ); |
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
| #/bin/bash | |
| wget -O /tmp/wallpaper.jpg https://unsplash.it/2560/1440/?random | |
| gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg |
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
| DATE(pu.created_at) = DATE(NOW()) | |
| This will allow you to get stuff for todays date as the Date function will remove the time. |
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
| #!/bin/sh | |
| directory=$1 | |
| shift | |
| # These extensions are checked | |
| extensions="php inc" | |
| check_file () |
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
| var el = document.getElementById('aniBox'); | |
| var adBox = document.getElementById('adBox'); | |
| // create an observer instance | |
| var observer = new MutationObserver(function(mutations) { | |
| mutations.forEach(function(mutation) { | |
| if(mutation.attributeName == 'style'){ | |
| var s = el.getAttribute('style'); | |
| if(s.search('height: 360px') != -1) { | |
| adBox.style = 'display: block'; | |
| } |
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
| border-radius: 50%; | |
| width: 50px; | |
| height: 50px; | |
| line-height: 50px; | |
| text-align: center; |
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 "./styles.css"; | |
| import React from "react"; | |
| import {Editor, EditorState, RichUtils} from 'draft-js'; | |
| import { dom } from "../../tools/dom"; | |
| export class CommentEditor extends React.Component { | |
| constructor(props) { | |
| super(props); |