One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
root/ | |
|-- scss/ # https://gist.github.com/ademilter/746cb307f14bd4e32de1#file-scss | |
| | |
|-- js/ # Script klasörü | |
| |-- plugin/ - Eklentilere ait scriptler | |
| |-- pages/ - Sayfalara özel scriptler | |
| |-- plugin.js - Plugin klasöründeki dosyaları bu dosya içinde birleştiriyoruz | |
| |-- main.js - Global olan bütün scriptleri buraya yazıyoruz | |
| | |
|-- img/ # Ham tasarım ve sprite gibi dosyalar (psd, sketch, ai, vs...) |
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
require 'sinatra' # gem install sinatra --no-rdoc --no-ri | |
set :port, 3000 | |
set :environment, :production | |
html = <<-EOT | |
<html><head><style> | |
#text{width:100%; font-size: 15px; padding: 5px; display: block;} | |
</style></head><body> | |
<input id="text" placeholder="Write then press Enter."/> | |
<div id="chat"></div> |
// Update the appropriate href query string parameter | |
function paramReplace(name, string, value) { | |
// Find the param with regex | |
// Grab the first character in the returned string (should be ? or &) | |
// Replace our href string with our new value, passing on the name and delimeter | |
var re = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
delimeter = re.exec(string)[0].charAt(0), | |
newString = string.replace(re, delimeter + name + "=" + value); | |
return newString; |
$(document) | |
.on("ajaxError", function(e, request, textStatus, errorThrown) { | |
window.open("/__better_errors", "error"); | |
}); |
def minutes_in_words(timestamp) | |
timestamp = Time.at(timestamp) | |
minutes = (((Time.now - timestamp).abs)/60).round | |
return nil if minutes < 0 | |
case minutes | |
when 0..1 then "less than 1 minute" | |
when 1..2 then "1 minute ago" | |
when 2..59 then "#{minutes} minutes ago" |