Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Hi! I cleaned up your code for you! #1

Merged
merged 1 commit into from

1 participant

@GunioRobot

Hi there!

This is WhitespaceBot. I'm an open-source robot that removes trailing white space in your code, and gives you a gitignore file if you didn't have one!

Why whitespace? Whitespace is an eyesore for developers who use text editors with dark themes. It's not a huge deal, but it's a bit annoying if you use Vim in a terminal. Really, I'm just a proof of concept - GitHub's V3 API allows robots to automatically improve open source projects, and that's really cool. Hopefully, somebody, maybe you!, will fork me and make me even more useful. My owner is funding a bounty to anybody who can add security fixing features to me.

I've only cleaned your most popular project, and I've added you to a list of users not to contact again, so you won't get any more pull requests from me unless you ask. If I'm misbehaving, please email my owner and tell him to turn me off! If this is pull request is of no use to you, please just ignore it.

Thanks!
WhiteSpacebot from Gun.io.

@zmcartor zmcartor merged commit bed07fc into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2011
  1. Remove whitespace [Gun.io WhitespaceBot]

    Gun.io Whitespace Robot authored
This page is out of date. Refresh to see the latest.
Showing with 59 additions and 9 deletions.
  1. +50 −0 .gitignore
  2. +6 −6 Blocky.coffee
  3. +1 −1  README
  4. +2 −2 sample.html
View
50 .gitignore
@@ -0,0 +1,50 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+*.pyc
+
+# Numerous always-ignore extensions
+###################
+*.diff
+*.err
+*.orig
+*.log
+*.rej
+*.swo
+*.swp
+*.vi
+*~
+
+*.sass-cache
+# Folders to ignore
+###################
+.hg
+.svn
+.CVS
+# OS or Editor folders
+###################
+.DS_Store
+Icon?
+Thumbs.db
+ehthumbs.db
+nbproject
+.cache
+.project
+.settings
+.tmproj
+*.esproj
+*.sublime-project
+*.sublime-workspace
+# Dreamweaver added files
+###################
+_notes
+dwsync.xml
+# Komodo
+###################
+*.komodoproject
+.komodotools
View
12 Blocky.coffee
@@ -1,4 +1,4 @@
-window.Blocky = class Blocky
+window.Blocky = class Blocky
constructor: (text = null ,container=null, config={}) ->
if container
@container=window.document.getElementById(container)
@@ -12,10 +12,10 @@ window.Blocky = class Blocky
@black = config.black or "rgb(0,0,0)"
@white = config.white or "rgb(255,255,255)"
#type and error level control how much information we can encode.
- @type_number = config.typenumber or 10
+ @type_number = config.typenumber or 10
@error_level = config.error_level or 'M'
#in case they put something stupid
- @error_level.charAt(0).toUpperCase in ['M', 'H', 'Q' ,'L'] or 'M'
+ @error_level.charAt(0).toUpperCase in ['M', 'H', 'Q' ,'L'] or 'M'
#some fun preset colors! :D
if config.scheme in ['watermelon' , 'wedding' , 'arctic' , 'spicy']
switch config.scheme
@@ -34,7 +34,7 @@ window.Blocky = class Blocky
return
@context = canvas.getContext '2d'
-
+
@das_code = new qrcode @type_number ,'L'
@das_code.addData text
@das_code.make()
@@ -44,7 +44,7 @@ window.Blocky = class Blocky
canvas.setAttribute 'height' , canvas_size
@container.appendChild canvas
- #big main loops to build the QR code
+ #big main loops to build the QR code
limit= @das_code.getModuleCount()
if canvas.getContext
@@ -56,6 +56,6 @@ window.Blocky = class Blocky
else
@context.fillStyle = @white
@context.fillRect c*@cell_size , r*@cell_size , @cell_size, @cell_size
-
+
else
console.log "no getContext.., cannot proceed."
View
2  README
@@ -15,7 +15,7 @@ Dependencies:
The JS library after the 11/5/2011 update is included within this project.
Installation:
- The compiled javascript is included from the associated .coffee file.
+ The compiled javascript is included from the associated .coffee file.
Include this in your page after qrcode.js (Kazuhiko's library)
Usage:
View
4 sample.html
@@ -1,6 +1,6 @@
<html>
<head>
-
+
<script type="text/javascript" src="qrcode.js"></script>
<script type="text/javascript" src="Blocky.js"></script>
</head>
@@ -12,5 +12,5 @@
new Blocky('http://hackazach.net' ,'funfun', {cell_size:11, scheme:'watermelon'})
</script>
-
+
</html>
Something went wrong with that request. Please try again.