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
D [0-9] | |
L [a-zA-Z_] | |
H [a-fA-F0-9] | |
E ([Ee][+-]?{D}+) | |
P ([Pp][+-]?{D}+) | |
FS (f|F|l|L) | |
IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U)) | |
%{ | |
#include <stdio.h> |
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
#![feature(quote)] | |
extern crate syntax; | |
use syntax::print::pprust; | |
use syntax::codemap::DUMMY_SP; | |
fn main() { | |
with_fake_extctxt(|cx| { | |
let x = quote_expr!(cx, (a+b)); |
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
py_binary( | |
name = 'generate_compile_command', | |
srcs = [ | |
'generate_compile_command.py', | |
], | |
deps = [ | |
'//third_party/bazel:extra_actions_proto_py', | |
], | |
) |
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
# Our .tmux.conf file | |
# Setting the prefix from C-b to C-s | |
set -g prefix C-s | |
# Free the original Ctrl-b prefix keybinding | |
unbind C-b | |
#setting the delay between prefix and command | |
set -sg escape-time 1 | |
# Ensure that we can send Ctrl-S to other apps | |
bind C-s send-prefix |
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
(defn code-mirror | |
"Create a code-mirror editor. The parameters: | |
value-atom (reagent atom) | |
when this changes, the editor will update to reflect it. | |
options | |
:style (reagent style map) | |
will be applied to the container element | |
:js-cm-opts | |
options passed into the CodeMirror constructor | |
:on-cm-init (fn [cm] -> nil) |
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
(use '[leiningen.exec :only (deps)]) | |
(deps '[[me.raynes/fs "1.4.6"] | |
[camel-snake-kebab "0.4.0"] | |
[cheshire "5.6.3"]]) | |
(require '[clojure.java.io :as io]) | |
(require '[camel-snake-kebab.core :as keb]) | |
(require '[cheshire.core :as json]) | |
(require '[me.raynes.fs :as fs]) |
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 markdown | |
from lxml import etree | |
body_markdown = "This is an [inline link](http://google.com). This is a [non inline link][1]\r\n\r\n [1]: http://yahoo.com" | |
doc = etree.fromstring(markdown.markdown(body_markdown)) | |
for link in doc.xpath('//a'): | |
print link.text, link.get('href') |
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
cat * | grep -shoP 'https.*[^).*]' |
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
#![crate_type = "lib"] | |
pub fn increment(data: &mut u32, next: fn() -> usize) -> usize { | |
*data += 1; | |
next() | |
} |
This file has been truncated, but you can view the full file.
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
/// Generated struct and trait implementations for: | |
/// ADC | |
/// Add with Carry | |
pub struct ADC {} | |
impl Ins2x<HardCodedOp, Imm8> for ADC { | |
pub fn ins2x(runtime: &JitRuntime, arg0: HardCodedOp, arg1: Imm8) { | |
bytes.push(0x14); | |
} | |
} | |
impl Ins2x<GPRegister8, Imm8> for ADC { |
NewerOlder