- tabs-to-spaces — 22,223
- auto-copyright — 1,148
- file-type-icons — 5,394
- set-syntax — 3,912
- language-r — 3,307
- indentation-indicator — 1,269
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 java.util.Random; | |
Random random = new Random(); | |
int number = random.nextInt(5); // Rock = 0, Paper = 1, Scissors = 2, Lizard = 3, Spock = 4 |
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/env ruby | |
require 'json' | |
require 'set' | |
package_dir = "#{ENV['HOME']}/.atom/packages" | |
packages = Dir[File.join(package_dir, '*')].select { |file| File.directory?(file) } | |
dependencies = {} | |
packages.each do |package| |
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
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
Forked from Rogie's Pen SVG zigzag.
A Pen by Captain Anonymous on CodePen.
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
long count_bits(long number) { | |
// Accumulates the total bits set in `number` | |
unsigned int count; | |
// This loop initializes the count, loops only until all bits have been cleared and | |
// increments the count each time through the loop. | |
for (count = 0; number; count++) { | |
// Clear the least significant bit set | |
number &= number - 1; | |
} |
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
var exec = require('child_process').spawn; | |
var node = exec('node', process.argv.splice(2), {stdio: 'inherit'}); |
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
;; Functions to work with frames | |
(provide 'ime-frame) | |
(defun screen-usable-height (&optional display) | |
"Return the usable height of the display. | |
Some window-systems have portions of the screen which Emacs | |
cannot address. This function should return the height of the | |
screen, minus anything which is not usable." |