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 | |
if (isset($cat) && !empty($cat)) : ?> | |
<nav role="category-navigation"> | |
<a href="#" id="dropdown-menu"><?php _e('Menu', 'dwframework'); ?></a> | |
<?php |
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
imap <f2> <c-o>:call ToggleHebrew()<cr> | |
map <f2> :call ToggleHebrew()<cr> | |
func! ToggleHebrew() | |
if &rl | |
set norl | |
set keymap= | |
else | |
set rl | |
set keymap=hebrew |
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
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
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
checking for C compiler default output file name... a.out | |
checking whether the C compiler works... yes | |
checking whether we are cross compiling... no | |
checking for suffix of executables... | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes | |
checking whether /usr/bin/clang accepts -g... yes | |
checking for /usr/bin/clang option to accept ISO C89... none needed | |
checking whether we are using the GNU C++ compiler... yes | |
checking whether /usr/bin/clang++ accepts -g... yes |
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
//// input[type="text"] toggle default value | |
$('input[type="text"]').blur(function() { | |
if (this.value == '') this.value = this.defaultValue; | |
}); | |
$('input[type="text"]').focus(function() { | |
if (this.value == this.defaultValue) this.value = ''; | |
}); |
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
app.run(function ($rootScope) { | |
$rootScope.$on('$routeChangeSuccess', function (e, data) { | |
if (data.$$route && data.$$route.controller) { | |
$rootScope.controller = data.$$route.controller.toLowerCase().replace('controller', '-controller'); | |
} | |
}) | |
}); |
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
public class FormHandler : DelegatingHandler | |
{ | |
protected override System.Threading.Tasks.Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) | |
{ | |
if (request.Content != null && request.Content.Headers.ContentType != null && | |
request.Content.Headers.ContentType.MediaType == "application/x-www-form-urlencoded") | |
{ | |
var routeData = request.Properties["MS_HttpRouteData"] as IHttpRouteData; | |
var form = request.Content.ReadAsFormDataAsync().Result; |
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 | |
// Allow from any origin | |
if (isset($_SERVER['HTTP_ORIGIN'])) { | |
header("Access-Control-Allow-Origin: *"); | |
header('Access-Control-Allow-Credentials: true'); | |
header('Access-Control-Max-Age: 86400'); // cache for 1 day | |
} | |
// Access-Control headers are received during OPTIONS requests | |
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { |
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
'use strict'; | |
function exampleController($scope, requestHandler) { | |
// notifications are enabled by default, if you do not wish the notification | |
// to show provide the stopNotification property with the value true | |
requestHandler({ | |
method: 'GET', | |
url: 'http://localhost/api/gist/1', | |
// stopNotification: true // will stop the notification from being displayed. |
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
'use strict'; | |
var app = angular.module('vulcanApp'); | |
app.filter('byMultipleValues', function() { | |
return function(data, params) { | |
if (params.length === 0) { | |
return data; | |
} | |
return data.filter(function(element, index) { |