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
| #!/usr/bin/ruby -w | |
| require "rubygems" | |
| require 'RMagick' | |
| Text = ':)' | |
| granite = Magick::ImageList.new('plasma:fractal') {self.size = "128x128"} | |
| canvas = Magick::ImageList.new | |
| canvas.new_image(128, 128, Magick::TextureFill.new(granite)) | |
| #canvas.rotate(45) |
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
| namespace Something.utils | |
| { | |
| public class XElementDiff | |
| { | |
| public static void AssertEqual(XElement actual, XElement source) | |
| { | |
| ValuesAreEqual(actual, source); | |
| TagsAreEqual(actual, source); | |
| var actualElements = actual.Elements(); | |
| var sourceElements = source.Elements(); |
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
| @ECHO OFF | |
| ruby convert_greek_to_utf8.rb "%~dpn0" %* | |
| pause |
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
| require "rubygems" | |
| require "nokogiri" | |
| def getfiles(dir) | |
| return Dir.new(dir).entries.select {|file| file =~ /[^.]*.html/ } | |
| end | |
| def replaceChars(str) | |
| return str.gsub('å','å').gsub('ä','ä').gsub('ö','ö') \ | |
| .gsub('Å','Å').gsub('Ä','Ä').gsub('Ö','ö') \ |
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
| desc "Check the JavaScript source with JSLint - exit with status 1 if any of the files fail." | |
| task :jslint do | |
| failed_files = [] | |
| classpath = File.join(RAILS_ROOT, "vendor", "rhino.jar") | |
| jslint_path = File.join(RAILS_ROOT, "vendor", "jslint.js") | |
| Dir['public/**/*.js'].reject{|path| path =~ /public\/ext\//}.each do |fname| | |
| cmd = "java -cp #{classpath} org.mozilla.javascript.tools.shell.Main #{jslint_path} #{fname}" | |
| results = %x{#{cmd}} | |
| unless results =~ /^jslint: No problems found in/ | |
| puts "#{fname}:" |
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
| #!c:/ruby/bin/ruby.exe | |
| require 'rubygems' | |
| require 'rubygems/gem_runner' | |
| require 'rubygems/exceptions' | |
| def install(lib) | |
| begin | |
| Gem::GemRunner.new.run ['install', lib] | |
| rescue Gem::SystemExitException => e | |
| 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
| ## This is a directory/file filter for WinMerge | |
| ## This filter suppresses various binaries found in Visual C# source trees | |
| name: Visual C# loose | |
| desc: Suppresses various binaries found in Visual C# source trees | |
| ## This is an inclusive (loose) filter | |
| ## (it lets through everything not specified) | |
| def: include | |
| ## Filters for filenames begin with f: |
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 = Backbone.Router.extend({ | |
| routes : { | |
| "" : "home" | |
| ,"/" : "home" | |
| ,"!" : "home" | |
| ,"!/" : "home" | |
| ,"!/:username" : "show_user" | |
| ,":username" : "show_user" | |
| ,":username/" : "show_user" |
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
| res = %x[port installed | grep -v -i '(active)' | grep -v 'The following ports are currently installed' | sed -e :a -e '\$!N; s\/\\n\/ \/; ta'] | |
| puts(res) | |
| u = %x[port uninstall #{res}] | |
| puts (u) |
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
| 0) Installera i windows | |
| http://arduino.cc/it/Guide/Windows | |
| Notera install the drivers sektionen | |
| 1) Bekanta sig med miljön | |
| File -> Examples | |
| samma hittas under: | |
| http://arduino.cc/en/Tutorial/HomePage | |
| 2) Led |
OlderNewer