Skip to content

Instantly share code, notes, and snippets.

View furkanayhan's full-sized avatar

Furkan Ayhan furkanayhan

View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 19, 2024 11:04
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

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.

Prerequisites

@ademilter
ademilter / Proje Klasör Düzeni
Last active February 19, 2024 11:23
Proje klasör düzeni
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...)
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active July 26, 2024 20:17
Uninstall nodejs from OSX Yosemite
# 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*
@vigo
vigo / tr-developer-podcasts.md
Last active June 9, 2017 11:11
Türkçe Developer PodCast'leri

Türkçe Developer PodCast’leri

devPod

[Web][1a] - [iTunes][1b]

webBox5

[Web][2a] - [iTunes][2b]

@profh
profh / decode_session_cookie.rb
Last active June 23, 2021 13:25
A simple script to decode Rails 4 session cookies
@emad-elsaid
emad-elsaid / chat.rb
Created March 1, 2014 13:18
creating simple network chat using ruby
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>
@emad-elsaid
emad-elsaid / share-screen.rb
Created February 22, 2014 10:30
share your screen on the local network
require 'socket'
require 'base64'
Refresh = 1 # seconds to refresh image on server
screen_capture_command = 'screencapture -C -x tmp.png'
image = ''
latest = Time.now
server = TCPServer.new 3000
loop do
@stinoga
stinoga / index.js
Created December 23, 2013 18:05
Replacing query string parameter values.
// 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;
@seyhunak
seyhunak / better_errors.js
Created July 29, 2013 13:27
Rails - Better Errors - Ajax
$(document)
.on("ajaxError", function(e, request, textStatus, errorThrown) {
window.open("/__better_errors", "error");
});
@seyhunak
seyhunak / minutes_in_words.rb
Created June 6, 2013 14:35
Ruby minutes_in_words converter
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"