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
rpm -ivh http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm | |
cd /etc/yum.repos.d/ | |
wget http://rpms.famillecollet.com/enterprise/remi.repo | |
yum install freetds | |
yum install freetds-devel | |
yum install --enablerepo=remi php-mssql |
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: {$_SERVER['HTTP_ORIGIN']}"); | |
header('Access-Control-Allow-Credentials: true'); | |
header('Access-Control-Max-Age: 86400'); | |
} | |
// 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
// This is the main application configuration file. It is a Grunt | |
// configuration file, which you can learn more about here: | |
// https://github.com/cowboy/grunt/blob/master/docs/configuring.md | |
/*jslint nomen: true*/ | |
'use strict'; | |
module.exports = function (grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
// The clean task ensures the entire XXX folder is removed | |
clean: { |
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 | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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
#!/bin/bash | |
for i in `brew list -1` | |
do | |
if [[ "$i" == python.* ]] || [[ "$i" == ruby.* ]] | |
then | |
continue | |
fi | |
brew rm $i && brew install $i | |
done |
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
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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 | |
try | |
{ | |
header('Access-Control-Allow-Origin: *'); | |
header('Content-Type: application/json'); | |
$ex = 'http://www.nbrb.by/Services/XmlExRates.aspx?ondate=' . date("m/d/Y"); |
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 main = function () { | |
var myEvent = document.createEvent('Event'); | |
myEvent.initEvent('CustomEvent', true, true); | |
function fireCustomEvent() { | |
document.body.dispatchEvent(myEvent); | |
}; | |
jQuery(document).ajaxComplete(function (event, request, settings) { |
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 actualCode = '(' + function () { | |
$(document).ajaxComplete(function () { | |
console.log('ajaxComplete'); | |
}); | |
} + ')();'; | |
var script = document.createElement('script'); | |
script.textContent = actualCode; | |
(document.head || document.documentElement).appendChild(script); |
OlderNewer