Skip to content

Instantly share code, notes, and snippets.

Avatar
🏆
Winning The Life

Seyhun Akyürek seyhunak

🏆
Winning The Life
View GitHub Profile
@seyhunak
seyhunak / rails_3_1_beta_1_changes.md
Created May 22, 2011 — forked from ryanb/rails_3_1_rc4_changes.md
The Changelogs for Rails 3.1 Beta 1
View rails_3_1_beta_1_changes.md

Railties 3.1 Beta 1

  • The -j option of the application generator accepts an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". As of this writing "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. Default is "jquery". [fxn]

  • jQuery is no longer vendored, it is provided from now on by the jquery-rails gem. [fxn]

  • Prototype and Scriptaculous are no longer vendored, they are provided from now on by the prototype-rails gem. [fxn]

  • The scaffold controller will now produce SCSS file if Sass is available [Prem Sichanugrist]

@seyhunak
seyhunak / gist:1024147
Created Jun 14, 2011
Cloning manual repo and push to Github
View gist:1024147
git clone --bare url/for/my-old-repo.git
cd my-old-repo.git
git push --mirror git@github.com:mycompany/my-new-repo.git
cd ..
rm -rf my-old-repo.git
@seyhunak
seyhunak / gist:1029381
Created Jun 16, 2011
Rake::DSL problem on Heroku
View gist:1029381
## RakeFile
require 'rake/dsl_definition'
@seyhunak
seyhunak / gist:1183291
Created Aug 31, 2011
Google Chrome Frame
View gist:1183291
<!--[if lt IE 9 ]>
<p>Your browser is <em>ancient!</em>
<a href="http://microsoft.com/ie">Upgrade</a> or
<a href="http://www.google.com/chromeframe/?prefersystemlevel=true&redirect=true">
install Google Chrome Frame</a> to experience this app.
</p>
< ![endif]-->
View gist:1264003
<style>
#github {left: -65px;
height: 30px;
top: 40px;
position: absolute;
text-decoration: none;
width: 250px;
-moz-transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
@seyhunak
seyhunak / dateinput_converter.js
Created Oct 20, 2011 — forked from pwim/dateinput_converter.js
Convert Rails style date input to jQuery Tools' dateinput
View dateinput_converter.js
// Based on http://snipt.net/boriscy/datetime-jquery-formtastic/
$.tools.dateinput.localize("ja", {
months: '1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月',
shortMonths: '1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月',
days: '日曜日,月曜日,火曜日,水曜日,木曜日,金曜日,土曜日',
shortDays: '日,月,火,水,木,金,土'
});
$.tools.dateinput.conf.format = 'yyyy-mm-dd';
@seyhunak
seyhunak / Backbone.View.Autocomplete.js
Created Oct 26, 2011 — forked from marksteve/Backbone.View.Autocomplete.js
Backbone View for jQuery UI Autocomplete inputs
View Backbone.View.Autocomplete.js
var Autocomplete = Backbone.View.extend({
initialize: function(options) {
options = _.extend({}, options);
_.bindAll(this, 'refresh');
// Input element
this.input = options.input;
// Choices collection
this.choices = options.choices;
// Selected collection
this.selected = options.selected;
@seyhunak
seyhunak / styler.xml
Created Nov 15, 2011 — forked from codegoalie/styler.xml
Notepad++ styles
View styler.xml
<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
<LexerStyles>
<LexerType name="actionscript" desc="ActionScript" ext="">
<!--
<WordsStyle name="DIRECTIVE" styleID="19" fgColor="A001D6" bgColor="363636" fontName="" fontStyle="1" fontSize="" keywordClass="instre2" />
-->
<WordsStyle name="DEFAULT" styleID="11" fgColor="FFFFFF" bgColor="363636" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="FUNCTION" styleID="20" fgColor="95004A" bgColor="363636" fontName="" fontStyle="0" fontSize="" keywordClass="type2" />
<WordsStyle name="PREPROCESSOR" styleID="9" fgColor="804000" bgColor="363636" fontName="" fontStyle="0" fontSize="" />
View gist:1393009
@import "twitter/bootstrap";
// -------------------------------
// Links
@linkColor: #8b59c2;
@linkColorHover: darken(@linkColor, 10);
// Grays
@black: #000;
@seyhunak
seyhunak / gist:1471973
Created Dec 13, 2011 — forked from moro/gist:1024620
Kaminari and pushState
View gist:1471973
(function($){
$('.pagination a[data-remote=true]').live('ajax:success', function(e){ window.history.pushState('', '', $(e.target).attr('href')) })
$(window).bind('popstate', function(){ $.ajax({url:window.location, dataType:'script'}) ; return true });
})(jQuery);