View Link.tsx
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
import * as React from "react"; | |
export type TLinkRef = HTMLSpanElement; | |
export interface ILinkProps { | |
/** | |
* Caption of the link element | |
*/ | |
caption: string; | |
/** |
View index.ts
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
import * as fs from "fs"; | |
import * as path from "path"; | |
import * as express from 'express'; | |
import * as bodyParser from "body-parser"; | |
import { Server, ServerConfig } from "./Server"; | |
import { deserialize } from "serializr"; | |
let serverConfig: ServerConfig = { | |
httpPort: 4444, | |
redisHost: "127.0.0.1", |
View find_by_ordered_ids.rb
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
module Extensions::ActiveRecord::FindByOrderedIds | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def find_ordered(ids) | |
order_clause = "CASE id " | |
ids.each_with_index do |id, index| | |
order_clause << sanitize_sql_array(["WHEN ? THEN ? ", id, index]) | |
end | |
order_clause << sanitize_sql_array(["ELSE ? END", ids.length]) | |
where(id: ids).order(order_clause) |
View geocode.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
var geocoder; | |
var map; | |
var marker; | |
function initialize() { | |
console.log("MAPS INITIALIZED"); | |
var myLatlng = new google.maps.LatLng($("#event_latitude").val(), $("#event_longitude").val()) | |
var mapOptions = { | |
zoom: 15, | |
center: myLatlng, | |
mapTypeId: google.maps.MapTypeId.ROADMAP, |
View main.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
import {add, sub} from "./ops.js"; | |
add(1,2); | |
import ops from "./ops.js" | |
ops.add(1,2); |
View unicorn.rake
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
# Tasks for managing Unicorn instances of a Rails application. | |
# Compatible with Ruby >= 1.9.2 and Rails >= 2 . | |
# Unicorn signals: http://unicorn.bogomips.org/SIGNALS.html | |
namespace :unicorn do | |
class UnicornPIDError < StandardError; end | |
def rails_env | |
Rails.env |
View feelbetter.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
var Twit = require("twit"); | |
var config = require('./oauthconfig'); | |
console.log("config:"); | |
console.log(config); | |
var T = new Twit({ | |
consumer_key: config.consumer_key, | |
consumer_secret: config.consumer_secret, | |
access_token: config.access_token, |
View reload css
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
function reloadStylesheets () { | |
var queryString = '?reload=' + new Date().getTime(); | |
jQuery('link[rel="stylesheet"]').each(function () { | |
this.href = this.href.replace(/\?.*|$/, queryString); | |
}); | |
} |
View turkce_isimler.sql
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
-- Turkce isimler sozlugu twitter : http://twitter.com/tserpico | |
CREATE TABLE `isimler` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`isimler` varchar(255) DEFAULT NULL, | |
`cinsiyet` varchar(255) DEFAULT NULL COMMENT 'erkek : E , kadın : K , uniseks : U', | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB; | |
-- ---------------------------- |
NewerOlder