This file contains 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
if [gui::enabled] { | |
create_toolbar_button -text "P/G" -script { | |
set pwr_vis [gui::check_display_controls "Nets/Power" visible] | |
set gnd_vis [gui::check_display_controls "Nets/Ground" visible] | |
gui::set_display_controls "Nets/Power" visible [expr !$pwr_vis] | |
gui::set_display_controls "Nets/Ground" visible [expr !$gnd_vis] | |
} | |
create_toolbar_button -text "Insts" -script { | |
gui::set_display_controls "Layers/*" visible false |
This file contains 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
(defconst ham-mode-keymap (make-sparse-keymap) "Keymap used in ham mode") | |
(define-key ham-mode-keymap (kbd "C-c C-0") 'go-ham) | |
(defgroup ham-mode nil | |
"HAM minor mode.") | |
(defun go-ham () | |
(interactive) | |
(message "HARD AS A MOTHERFUCKER")) |
This file contains 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
#include <stdio.h> | |
#include <unistd.h> | |
int main(void) { | |
setbuf(stdout, NULL); | |
char *c = "\\-/|"; | |
for (int i = 0; i < 4; i = (i == 3) ? 0 : i + 1) { | |
putc(c[i], stdout); | |
usleep(12000); | |
putc('\r', stdout); |
This file contains 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
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
#include <vector> | |
#include <future> | |
using namespace std; | |
string flip(string s) { | |
reverse( begin(s), end(s) ); |
This file contains 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 com.twitter.conversions.string._ | |
import java.nio.ByteBuffer | |
import org.apache.thrift.protocol._ | |
import org.apache.thrift.transport.TTransport | |
import scala.collection.mutable | |
object ThriftDebugProtocol { | |
val Tab = " " | |
val KeyValueDelim = " = " | |
val NewLine = "\n" |
This file contains 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 | |
# giftube – Generates an animated gif from a YouTube url. | |
# | |
# Usage: | |
# | |
# giftube [youtube url] [minute:second] [duration] | |
# | |
# ex. | |
# |
This file contains 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 'formula' | |
class Emacs < Formula | |
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3a.tar.bz2' | |
md5 'f2cf8dc6f28f8ae59bc695b4ddda339c' | |
homepage 'http://www.gnu.org/software/emacs/' | |
if ARGV.include? "--use-git-head" | |
head 'git://repo.or.cz/emacs.git' | |
else |
This file contains 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
package preloadagent; | |
/** | |
Copyright 2010 Sam Pullara | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
;; emacsd-tile.el -- tiling windows for emacs | |
(defun swap-with (dir) | |
(interactive) | |
(let ((other-window (windmove-find-other-window dir))) | |
(when other-window | |
(let* ((this-window (selected-window)) | |
(this-buffer (window-buffer this-window)) | |
(other-buffer (window-buffer other-window)) | |
(this-start (window-start this-window)) |