Inspired by Literate CoffeeScript.
$ cat hello.rb.md
Here's a simple program
puts "Hello, world"
$ ruby litrb.rb < hello.rb.md
Hello, world
# A few examples about how to use Ruby for parsing files as we could do | |
# with Awk or Grep. This is based on what I learn fro this post: | |
# http://code.joejag.com/2009/using-ruby-as-an-awk-replacement/ | |
# Split each line with ':' and print the first $F[0] field | |
awk -F: '{ print $1 }' /etc/passwd | |
ruby -F: -nae 'puts $F[0]' /etc/passwd | |
# Parse the 'ps aux' output | |
# It'll print the ID process for the 'jojeda' user |
@font-face { | |
font-family: 'EntypoRegular'; | |
src: url('font/entypo.eot'); | |
src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
url('font/entypo.woff') format('woff'), | |
url('font/entypo.ttf') format('truetype'), | |
url('font/entypo.svg#EntypoRegular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
Inspired by Literate CoffeeScript.
$ cat hello.rb.md
Here's a simple program
puts "Hello, world"
$ ruby litrb.rb < hello.rb.md
Hello, world
import Control.Monad | |
import Control.Concurrent | |
import Control.Concurrent.STM | |
import System.Random | |
import Text.Printf | |
-- Forks | |
type Fork = TMVar Int | |
newFork :: Int -> IO Fork |
use std::unstable::intrinsics::{TyDesc, get_tydesc, forget}; | |
use std::util::Void; | |
use std::cast::transmute; | |
/////////////////////////////////////////////////////////////////////////////// | |
// TypeId | |
/////////////////////////////////////////////////////////////////////////////// | |
/// `TypeId` represents a globally unique identifier for a type | |
pub struct TypeId { |
This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.
Most the credit for these changes go to Dave Holland.
;; 1. place this in ~/.emacs.d/private/intero/packages.el | |
;; 2. add intero, syntax-checking and auto-completion to your | |
;; ~/.spacemacs layer configuration & remove the haskell layer | |
;; if you were using that before | |
;; 3. make sure you have stack installed http://haskellstack.org | |
;; 4. fire up emacs & open up a stack project's source files |
Windows Service with Python 3.5 and pyinstaller
// Type definitions for react-redux 4.4.0 | |
// Project: https://github.com/rackt/react-redux | |
// Definitions by: Qubo <https://github.com/tkqubo>, Sean Kelley <https://github.com/seansfkelley>, Kyle Herock <https://github.com/rockmacaca> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
// TypeScript Version: 2.1 | |
import * as React from 'react'; | |
import * as Redux from 'redux'; | |
export as namespace ReactRedux; |