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
select asciiname,latitude,longitude, acos(SIN( PI()* 40.7383040 /180 )*SIN( PI()*latitude/180 ) | |
)+(cos(PI()* 40.7383040 /180)*COS( PI()*latitude/180) *COS(PI()*longitude/180-PI()* -73.99319 /180) | |
)* 3963.191 AS distance | |
FROM allcountries | |
WHERE 1=1 | |
AND 3963.191 * ACOS( (SIN(PI()* 40.7383040 /180)*SIN(PI() * latitude/180)) + | |
(COS(PI()* 40.7383040 /180)*cos(PI()*latitude/180)*COS(PI() * longitude/180-PI()* -73.99319 /180)) | |
) < = 1.5 | |
ORDER BY 3963.191 * ACOS( | |
(SIN(PI()* 40.7383040 /180)*SIN(PI()*latitude/180)) + |
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
/** | |
* | |
* | |
* Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a> |
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 a minified javascript module because I have not had a chance to refactor and | |
clean up the horrible hacks I have done to make this work, and I don't want to expose | |
the code and then spend alot of time responding to issues and/or questions. | |
This code is released AS IS and I will clean it up, document it better and eventually | |
re-release it as a module or open source | |
*/ | |
Ti.include('linkedin_module-min.js'); |
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 | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
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
yum -y update | |
yum -y install emacs readline-devel ncurses-devel libevent-devel glib2-devel libjpeg-devel freetype-devel bzip2 bzip2-devel bzip2-libs openssl-devel pcre pcre-devel gpg make gcc yum-utils unzip | |
yum grouplist |grep -i Development | |
rpm -ihv http://centos.alt.ru/repository/centos/6/x86_64/centalt-release-6-1.noarch.rpm | |
rpm -Uvh http://mirrors.ukfast.co.uk/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm |
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
def upload | |
ajax_upload = params[:qqfile].is_a?(String) # either a file name (set) or a file (NOT SET, but qqFileUploader allows for it) | |
filename = ajax_upload ? params[:qqfile] : params[:qqfile].original_filename | |
if ajax_upload | |
csv_source = request.body.read | |
else | |
csv_source = params[:qqfile].read | |
end | |
tmp_file = "#{Rails.root}/data/tmp-#{cookies[:remember_token]}.csv" | |
csv_valid = false |
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
class PromotionsController < ApplicationController | |
require 'barby/barcode/ean_8' | |
require 'barby/barcode/ean_13' | |
require 'csv' | |
require 'nokogiri' | |
require 'cgi' | |
require 'json' | |
require 'builder/xchar' |
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 var %a | |
on *:text:!ring *:#: { | |
if ( $nick ison #fang.priv) { %a = $2- } | |
if (+* iswm %a) { /ring %a } | |
else { /msg #fang.priv 9looking up number for %a | |
/msg angelica .phone show %a } | |
} | |
on *:TEXT:*valid*:?: { |
This file has been truncated, but you can view the full file.
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 COMPILED = !0, goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = !1; | |
goog.LOCALE = "en"; | |
goog.provide = function (a) { | |
if (!COMPILED) { | |
if (goog.isProvided_(a)) | |
throw Error('Namespace "' + a + '" already declared.'); | |
delete goog.implicitNamespaces_[a]; |
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 | |
SCP_USER='user' | |
SCP_HOST='host' | |
SCP_PASS='pass' | |
SCP_PATH='/path/to/file' | |
HTTP_URL="http://url" | |
FILENAME=`(cat /dev/random|head -c 10; date) | md5 -q | head -c 10`.png |
OlderNewer