This file contains hidden or 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
| $("ol.statuses [id ^= direct_message]").each(function (index, item) { | |
| $.post("http://twitter.com/direct_messages/destroy/" + $(item).attr("id").split("_")[2]); | |
| $(item).hide() | |
| }); |
This file contains hidden or 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
| @model.bind "change", @render | |
| setInterval ()=> | |
| @model.fetch() | |
| , 20000 |
This file contains hidden or 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
| Sequel.migration do | |
| up do | |
| run("create extension if not exists postgis;") | |
| alter_table :events do | |
| add_column :geo_location, :geography | |
| add_full_text_index [:description, :name], :language=>'english' | |
| add_index :geo_location, :type=>:gist | |
| end | |
| end |
This file contains hidden or 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
| lines = IO.readlines("app/views/terms.haml").map do |line| | |
| line.encode('ASCII-8BIT', :invalid => :replace, :undef => :replace) | |
| end | |
| File.open("app/views/terms2.haml", "w") do |file| | |
| file.puts(lines) | |
| end |
This file contains hidden or 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 estimate(arr) { | |
| return arr.reduce(function(prev, curr, index, array){ | |
| return prev + convertToValue(curr.toString()); | |
| }, 0); | |
| } | |
| function estimateRisk(arr){ | |
| return arr.reduce(function(prev, curr, index, array){ | |
| return prev + convertToRisk(curr.toString()); | |
| }, 0); |
This file contains hidden or 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
| (ns modern_js.core) | |
| {:zoom 14, :disableDefaultUI true :draggable false, :scrollwheel false } |
This file contains hidden or 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.Router.map(function(){ | |
| this.resource("home", {path: "/"}, function(){ | |
| this.resource("category", {path: "/:name"}, function(){ | |
| this.route("featured", {path:"/featured"}) | |
| this.route("popular", {path:"/popular"}) | |
| }); | |
| }) | |
| }) | |
This file contains hidden or 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
| nmap <leader>f :call RunAg()<CR> | |
| function! RunAg() | |
| let string = input('term: ') | |
| execute ':Ag ' . string . ' ./' | |
| endfunction |
This file contains hidden or 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
| defmodule PostgrexBugTest do | |
| use ExUnit.Case, async: false | |
| setup_all do | |
| { :ok, pid } = Postgrex.Connection.start_link([hostname: "localhost", username: "postgres", password: "postgres", database: "postgrex"]) | |
| Postgrex.Connection.query!(pid, "CREATE TABLE items(id serial primary key, value text, created timestamp default CURRENT_TIMESTAMP)") | |
| {:ok, [pid: pid]} | |
| end | |
| teardown_all context do |
This file contains hidden or 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
| wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb -O /tmp/erlang-solutions_1.0_all.deb | |
| Stdout from the command: | |
| Stderr from the command: | |
| --2014-01-15 23:04:22-- https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
| Resolving packages.erlang-solutions.com (packages.erlang-solutions.com)... 31.172.186.53 |
OlderNewer