Room Name
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
| <!DOCTYPE html> | |
| <html ng-app="sort"> | |
| <body ng-controller="SortingController"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.1.0/lodash.min.js"></script> | |
| <table border="1"> | |
| <tr ng-repeat="c in data"> | |
| <th>data[{{ $index }}]</th> | |
| <th>{{ c }}</th> | |
| <th><div style="width: {{ c * 30 }}px; height: 30px; background: black;"></div></th> |
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 'matrix' and gets.to_i.times { |i| puts "Case ##{i+1}: #{(m = Matrix[*Array.new(gets.split.map(&:to_i)[0]) { gets.split.map(&:to_i) }]).enum_for(:each_with_index).all? { |c,i,j| [m.row(i).max, m.column(j).max].min == c } ? 'YES' : 'NO'}" } |
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
| # FizzBuzz in Lambda Calculus LiveScript | |
| # | |
| # Based on the problem from Chapter 6 of | |
| # Understanding Computation: From Simple Machines to Impossible Programs | |
| # by Tom Stuart | |
| # http://computationbook.com/ | |
| # | |
| # Only these things are allowed: | |
| # - Creating functions |
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
| function chain(obj, ctx) { | |
| var result | |
| if (ctx === undefined) ctx = {} | |
| function next(fn) { | |
| if (fn == null) return result | |
| if (result === undefined) result = fn.call(obj, ctx) | |
| return next | |
| } | |
| return next |
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 'pty' | |
| require 'io/console' | |
| STDIN.raw do | |
| File.open('keylog.txt', 'a') do |log| | |
| PTY.spawn('vim wtf') do |r, w, pid| | |
| w.winsize = STDIN.winsize | |
| rs = { STDIN => w, r => STDOUT } | |
| rs.compare_by_identity | |
| loop do |
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
| <!-- synchroscope stuff --> | |
| <script src="https://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script><!-- optional --> | |
| <script src="https://synchroscope.herokuapp.com/socket.io/socket.io.js"></script> | |
| <script src="https://synchroscope.herokuapp.com/sync.js"></script> | |
| <!-- end synchroscope stuff --> |
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
| " put me in your vimrc | |
| " bind run command | |
| map <leader>r :call RunCustomCommand()<cr> | |
| map <leader>s :call SetCustomCommand()<cr> | |
| let g:silent_custom_command = 0 | |
| function! RunCustomCommand() | |
| up | |
| if g:silent_custom_command | |
| execute 'silent !' . s:customcommand | |
| else |
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
| // returns itself | |
| var self = function(object) { | |
| return object | |
| } | |
| var get = function(name) { | |
| // returns a property of an object | |
| return function(object) { | |
| return object[name] |
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
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <iframe name="hello" id="hello" frameborder="0" style="width:0;height:0;position:absolute;left:-1000px"></iframe> | |
| <input type="button" id="button" value="submit"> | |
| <script> | |
| document.getElementById('button').addEventListener('click', function() { |