This file contains 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>').addClass('comment').attr('data-id',3) | |
.append( | |
$('<div>').addClass('photo').append( | |
$('<img>').attr('src','url').attr('width','50').attr('height','50')) | |
).append( | |
$('<div>').addClass('name').append( | |
'Username' | |
) | |
).append( |
This file contains 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
$.ajax({ | |
type:"GET", | |
url:baseurl, | |
beforeSend:function (xhr) { | |
var creds = username + ":" + password; | |
var basicScheme = btoa(creds); | |
var hashStr = "Basic " + basicScheme; | |
xhr.setRequestHeader('Authorization', hashStr); | |
xhr.setRequestHeader('accept', 'application/json'); | |
}, |
This file contains 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
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
This file contains 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
{"lastUpload":"2019-02-26T08:44:01.263Z","extensionVersion":"v3.2.5"} |
This file contains 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
# Delete all local merged branches | |
git branch --merged | egrep -v "(^\*|master|develop)" | xargs git branch -d | |
# Delete All local branches except master and develop | |
git branch | egrep -v "(^\*|master|develop)" | xargs git branch -d | |
# Delete all stashes | |
git stash clear | |
# Delete all local tags |
This file contains 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 AsyncComponent = () => ({ | |
// The component to load (should be a Promise) | |
component: import('./MyComponent.vue'), | |
// A component to use while the async component is loading | |
loading: LoadingComponent, | |
// A component to use if the load fails | |
error: ErrorComponent, | |
// Delay before showing the loading component. Default: 200ms. | |
delay: 200, | |
// The error component will be displayed if a timeout is |
This file contains 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
Vue.component('terms-of-service', { | |
template: ` | |
<div v-once> | |
<h1>Terms of Service</h1> | |
... a lot of static content ... | |
</div> | |
` | |
}) |
This file contains 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
on: { | |
'!click': this.doThisInCapturingMode, | |
'~keyup': this.doThisOnce, | |
'~!mouseover': this.doThisOnceInCapturingMode | |
} |
This file contains 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="dynamicexample"> | |
<h3>Scroll down inside this section ↓</h3> | |
<p v-pin:[direction]="200">I am pinned onto the page at 200px to the left.</p> | |
</div> | |
Vue.directive('pin', { | |
bind: function (el, binding, vnode) { | |
el.style.position = 'fixed' | |
var s = (binding.arg == 'left' ? 'left' : 'top') | |
el.style[s] = binding.value + 'px' | |
} |
This file contains 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
<my-component inline-template> | |
<div> | |
<p>These are compiled as the component's own template.</p> | |
<p>Not parent's transclusion content.</p> | |
</div> | |
</my-component> |
OlderNewer