Copy the prism.js
file under examples/prism/
in Draft.js repository.
Run npm install prismjs
Then open it in your browser.
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
# Show file modified since a specific commit: | |
git log --name-only --pretty=oneline --full-index 64b7d1ead..HEAD | grep -vE '^[0-9a-f]{40} ' | sort | uniq | |
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
pcm.!default { | |
type asym | |
playback.pcm { | |
type plug | |
slave.pcm "hw:0,0" | |
} | |
capture.pcm { | |
type plug | |
slave.pcm "hw:1,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
[Unit] | |
Description=PulseAudio Daemon | |
Requires=sound.target dbus.service | |
After=sound.target dbus.service | |
[Service] | |
Type=simple | |
#ExecStart=/usr/bin/pulseaudio -D | |
ExecStart=/usr/bin/pulseaudio --system --realtime --disallow-exit --disallow-module-loading |
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
#read the current pref, returns '0' for off and '1' for on. | |
defaults read /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState | |
#set bluetooth pref to off | |
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0 | |
#set bluetooth pref to on | |
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1 | |
#kill the bluetooth server process |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"log" | |
"net/http" | |
pb "test_protobuf/post" | |
proto "github.com/golang/protobuf/proto" |
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
package main | |
import ( | |
"reflect" | |
"fmt" | |
"time" | |
) | |
type MyStruct struct { | |
CreatorId string `json:"creator_id"` |
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 ( | |
"fmt" | |
) | |
type Toto struct { | |
S string | |
N struct { | |
I int64 | |
} | |
} |
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
// Create our own MyResponseWriter to wrap a standard http.ResponseWriter | |
// so we can store the status code. | |
type MyResponseWriter struct { | |
status int | |
http.ResponseWriter | |
} | |
func NewMyResponseWriter(res http.ResponseWriter) *MyResponseWriter { | |
// Default the status code to 200 | |
return &MyResponseWriter{200, res} |