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
<?php | |
// Use in the "Post-Receive URLs" section of your GitHub repo. | |
if ( $_POST['payload'] ) { | |
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
} | |
?>hi |
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
angular.module('app.controllers', ['favico.service']).controller('homeCtrl', ['$scope', 'favicoService', /** | |
* Home view controller | |
* @param {Object} $scope | |
*/ | |
function($scope, favicoService) { | |
//initial value | |
$scope.count = 3; | |
//badge +1 | |
$scope.plusOne = function() { | |
$scope.count = $scope.count + 1; |
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
angular.module('Prism', []). | |
directive('prism', [function() { | |
return { | |
restrict: 'A', | |
link: function ($scope, element, attrs) { | |
element.ready(function() { | |
Prism.highlightElement(element[0]); | |
}); | |
} | |
} |
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
Meteor.Router.add({ | |
'/inbound': function() { | |
post = this.request.body; | |
color = post.subject; | |
Colors.update({pos: 1},{ $set: { "name": color } } ); | |
return [200, "Success"] | |
} | |
}); |
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
var addUserService; | |
addUserService = function(service) { | |
if (service === "email") { | |
} else { | |
switch (service) { | |
case "facebook": | |
return Facebook.requestCredential({ | |
requestPermissions: ["email", "user_friends", "manage_notifications"] |
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
var readTime = function(text){ | |
var regex = /(<([^>]+)>)/ig; | |
var minutes = Math.floor(text.trim().replace(regex, ' ').split(' ').length / 200 ) | |
if(minutes === 0) minutes = 1 | |
return minutes + ' min read' | |
} |
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
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version, Sublime Text 3 version 3103. | |
Go to menu Help > Enter License. | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License |
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
sudo wget -O /etc/udev/rules.d/70-u2f.rules https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-u2f.rules |
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
let newKey = new Date().getTime(); | |
let list = af.database.object(`/items/${newKey}`).set({ name: 'Test' }); |
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
<template> | |
<button class="btn btn-sm btn-primary" v-on:click="togglefav" ><i v-bind:class="[is_fav ? 'fa-heart' : 'fa-heart-o', 'fa']" aria-hidden="true"></i></button> | |
</template> | |
<script> | |
export default { | |
props:['is_fav'], | |
methods:{ | |
togglefav:function(){ | |
this.$emit('togglefav',!this.is_fav); |