Skip to content

Instantly share code, notes, and snippets.

View NARKOZ's full-sized avatar

Nihad Abbasov NARKOZ

  • Kyiv, Ukraine
View GitHub Profile
@weppos
weppos / title_helper.rb
Created August 3, 2008 20:46
Provides helpers for managing page title.
#
# = Rails Title Helper
#
# Provides helpers for managing page title.
#
# Category:: Rails
# Package:: Helpers
# Author:: Simone Carletti <weppos@weppos.net>
# Copyright:: 2007-2008 The Authors
# License:: MIT License
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName example.com
# ServerAlias *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
@rtomayko
rtomayko / Tests Is Wrong
Created January 28, 2009 20:50
Why "require 'rubygems'" In Your Library/App/Tests Is Wrong
In response to all the responses to:
http://twitter.com/rtomayko/status/1155906157
You should never do this in a source file included with your library,
app, or tests:
require 'rubygems'
The system I use to manage my $LOAD_PATH is not your library/app/tests
@shapeshed
shapeshed / clean_filenames.sh
Created February 3, 2009 13:49
Bash script to convert all filename in a folder to lowercase and replace spaces with underscores
#!/bin/bash
# Replaces spaces in filenames with underscores and converts filenames to lowercase
# Run within a directory to convert all files
ls | while read -r FILE
do
mv -v "$FILE" `echo $FILE | tr ' ' '_' | tr -d '[{}(),\!]' | tr -d "\'" | tr '[A-Z]' '[a-z]' | sed 's/_-_/_/g'`
done
@defunkt
defunkt / startupriot.markdown
Last active September 15, 2023 18:11
Startup Riot 2009 Keynote

(This is the text of the keynote I gave at Startup Riot 2009. Will update when video becomes available.)

Hi everyone, I'm Chris Wanstrath, and I'm one of the co-founders of GitHub.

GitHub, if you haven't heard of it, has been described as "Facebook for developers." Which is great when talking about GitHub as a website, but not so great when describing GitHub as a business. In fact, I think we're the polar opposite of Facebook as a business: we're small, never took investment, and actually make money. Some have even called us successful.

Which I've always wondered about. Success is very vague, right? Probably even relative. How do you define it?

After thinking for a while I came up with two criteria. The first is profitability. We employ four people full time, one person part time, have thousands of paying customers, and are still growing. In fact, our rate of growth is increasing - which means January was our best month so far, and February is looking pretty damn good.

@IntendedConsequence
IntendedConsequence / MyAnimeList.js
Created May 30, 2009 04:07 — forked from aoikishu/MyAnimeList
A Firefox Ubiquity Parser 2 compatible version of MyAnimeList.net anime and character search command
// anime and character searches for MyAnimeList.net
// An advanced search command for MyAnimeList.net
CmdUtils.CreateCommand({
names: [ "mal-search", "anime-search" ], //mal as in MyAnimeList.net 8)
author: { name: "aoikishu"},
contributors: [ "Irwin1138" ],
description: "Searches anime on MyAnimeList.net",
help: "You can specify a type (ova, tv, movie, special or ona) and a score",
/// Parser 2 incompatible old format
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't be busy with technology
- a medium is not a grande
- break convention for your users
Hi, my name is Ma. Reina S. (29826). How may I help you? [12:26:30 PM]
Woody Gilk: Hello [12:26:40 PM]
Woody Gilk: I have a Linksys WET54G and i am trying to upgrade the firmware [12:26:51 PM]
Ma. Reina S. (29826): Hello, Woody! [12:27:31 PM]
Ma. Reina S. (29826): Before we proceed, may I ask which country you are located? [12:27:32 PM]
Woody Gilk: USA [12:27:07 PM]
Ma. Reina S. (29826): Please look underneath the device itself and get the Version number and the Serial Number (SN) of the WET54G. I need to verify that. [12:28:02 PM]
Woody Gilk: no version number [12:27:50 PM]
Woody Gilk: serial number is bdy003802478 [12:28:11 PM]
Ma. Reina S. (29826): Okay, it's version 1. Please hold on. [12:29:00 PM]
@2bj
2bj / whoiskg
Created July 7, 2009 15:48
bash implementation of http://www.domain.kg/whois.html
#!/bin/bash
# bash implementation of http://www.domain.kg/whois.html
# @author 2bj (gml2bj gmail)
if [ $# -eq 0 ]; then
echo "pls, give me domain (*.kg)"
exit 1
fi
DOMAIN=`echo $1 | tr '[:lower:]' '[:upper:]'`