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
| (defun colot-theme-im3 () | |
| (interactive) | |
| (color-theme-install | |
| '(color-theme-im3 | |
| ((background-color . "#0f141a") | |
| (background-mode . light) | |
| (border-color . "#0f0d26") | |
| (cursor-color . "#1016f9") | |
| (foreground-color . "#ffffff") | |
| (mouse-color . "black")) |
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
| import org.example.Person | |
| class PersonTests < Test::Unit::TestCase | |
| def setup | |
| @person = Person.new("Jan", "Kowalski") | |
| end | |
| def test_person_getter_although_we_shouldnt | |
| assert_match /Kowalski/, @person.getSurname | |
| 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
| require 'time' | |
| data = `git log | grep "^Date"`.split($/). | |
| map { |line| Time.parse(line.split(' ')[4]) }. | |
| group_by { |x| x.hour } | |
| data.each { |k, v| data[k] = data[k].size } | |
| total_commits = data.values.inject(0) { |sum, x| sum += x } | |
| data = data.sort { |a, b| a[0] <=> b[0] } | |
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
| ! ~/.Xdefaults - for X11/Cygwin running xterm | |
| XTerm*termName: xterm-256color | |
| xterm*scrollBar: false | |
| xterm*vt100.scrollBar: false | |
| xterm*vt100.font: Inconsolata-11 | |
| xterm*background: black | |
| xterm*foreground: white | |
| xterm*multiScroll: on | |
| xterm*jumpScroll: on |
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
| private void handleStreamPlayback(RegisterAccess register) { | |
| XletLogger.log("Handle stream playback"); | |
| discNavigator = new ProgresivePlaylistNavigator(this); | |
| discNavigator.init(); | |
| guiContainer.setVisible(true); | |
| guiContainer.requestFocus(); | |
| guiContainer.repaint(); | |
| int state = register.getGPR(0); |
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
| # -*- mode: snippet -*- | |
| # contributor: Ignacy Moryc <[email protected]> | |
| # name: getAset | |
| # key: gs | |
| # -- | |
| private void set$1($1 ${1:$(downcase text)})) { | |
| this.${1:$(downcase text)} = ${1:$(downcase text)}; | |
| } |
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
| while true; do spec spec/models/suggestion_spec.rb; sleep 5; done |
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
| (defun im/reek-on-buffer() | |
| "Run reek on current buffer" | |
| (interactive) | |
| (get-buffer-create "reekOut") | |
| (shell-command-on-region (point-min) (point-max) "reek" | |
| ;; output buffer | |
| "reekOut" nil | |
| "*reekErrors*" nil) | |
| (split-window-horizontally) | |
| (other-window 0) |
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
| (define (average a b) | |
| (/ (+ a b) 2)) | |
| (define (close-enough? x y) | |
| (< (abs (- x y)) 0.01)) | |
| (define (search f neg-point pos-point) | |
| (let ((midpoint (average neg-point pos-point))) | |
| (if (close-enough? neg-point pos-point) | |
| midpoint |
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
| (defun welcome-page-handler (httpcon) | |
| (elnode-http-start httpcon "200" '("Content-type" . "text/html")) | |
| (elnode-http-return httpcon "<html><body><h1>Hello there!!</h1></body></html>")) | |
| (elnode-start 'welcome-page-handler :port 8010 :host "localhost") |