module.exports = function scaffoldComponent(name) { | |
return `<script setup lang="ts"> | |
export interface Props { | |
//Component props go here. | |
} | |
/* -------------------------------------------------------------------------- */ | |
const emit = defineEmits<{ | |
// component events go here. |
# @manojampalam - authored initial script | |
# @friism - Fixed issue with invalid SDDL on Set-Acl | |
# @manojampalam - removed ntrights.exe dependency | |
# @bingbing8 - removed secedit.exe dependency | |
$scriptpath = $MyInvocation.MyCommand.Path | |
$scriptdir = Split-Path $scriptpath | |
$sshdpath = Join-Path $scriptdir "sshd.exe" | |
$sshagentpath = Join-Path $scriptdir "ssh-agent.exe" |
# Default GitHub user | |
Host github.com | |
HostName github.com | |
User git | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa_github | |
IdentitiesOnly yes | |
Host github.com-rhm | |
HostName github.com |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to make opened Markdown files always be soft wrapped: | |
# | |
# path = require 'path' | |
# |
Never touch your local /etc/hosts file in OS X again
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
Requirements
- Homebrew
- Mountain Lion
Install
(function() { | |
var imgData = [], | |
windowHeight = window.innerHeight; | |
lastScrollPosition = 0; | |
function getOffset(element) { | |
var rect = element.getBoundingClientRect(); | |
return { | |
top: rect.top + document.body.scrollTop, |
/** | |
* Pads a string so it will reach the requested number of characters. The | |
* padding will be added to the left of the original string. | |
* | |
* @param {string} value The original string, unpadded. | |
* @param {Number} length The desired length for the value string. Please | |
* note that this value should be equal to or exceed | |
* the unpadded length of the value parameter or | |
* else the result will be a clipped string. | |
* @param {string} padChar The character to use to pad the string. When no |
var vendors = ['webkit', 'moz', 'ms']; | |
/** | |
* This method sets a CSS property. It will set the standard property as | |
* well as vender prefixed versions of the property. | |
* | |
* @param {HTMLElement} element The element whose property to set | |
* @param {string} property The unprefixed name of the property | |
* @param {string} value The value to assign to the property | |
*/ | |
function setPrefixedProperty(element, property, value) { |
It is my opinion that tabs are better than spaces, especially when working in a team. Why you aks? When using tabs everyone has the ability to indent the code according to their own preference. If your teams decides on using spaces you also need to agree on how many spaces to use for an indent. Do you pick 2 spaces, 4 spaces or something else? Odds are, someone is not going to be happy with the team's decision.
Using tabs gives everyone the freedom to indent the code to their own liking. Most editors have an option to specify how many columns a tab should indent. This allows each team member to pick the setting they're most comfortable with.
To prevent (Git) diff nightmares just follow these simple steps:
- Always follow the convention used in the project you're working on. If it is a legacy code base and uses 5 spaces for indenting code, use 5 spaces in the code you add or modify;
- Have your editor (or Git pre-commit hook) strip all trailing whitespace from your files. Trailing whitespace serves no purpo