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
! Chromebook C720 ~/.Xmodmap | |
! Huan Truong - 2014 | |
! = <1:Key> <2:Shift+Key> <3:mode_switch+Key> <4:mode_switch+Shift+Key> <5:AltGr+Key> <6:AltGr+Shift+Key> <7:Ctrl+Alt+Key> | |
! Clear both Alt keys mapping | |
clear Mod1 | |
add mod1 = Alt_L | |
! Make the right alt key to be the mode switch key | |
keycode 108 = Mode_switch |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<schema name="wikipedia" version="1.2"> | |
<types> | |
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> | |
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> | |
<fieldType name="text" class="solr.TextField" positionIncrementGap="100"> | |
<analyzer type="index"> | |
<tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="1"/> |
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
#!/bin/sh | |
# | |
# An example hook script that is called after a successful | |
# commit is made. | |
# | |
# To enable this hook, make this file executable. | |
echo "Starting auto-deploy..." | |
cd /usr/share/django |
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
// Copyright 2010 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"compress/gzip" |
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 main | |
import ( | |
"log" | |
"io" | |
"os" | |
"crypto/tls" | |
"strings" | |
"net" | |
"flag" |
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 slowsort | |
import ( | |
"reflect" | |
"sort" | |
) | |
func Sort(sl interface{}, less interface{}) { | |
rsl := reflect.ValueOf(sl) | |
if rsl.Kind() != reflect.Slice { |
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 dropbox | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"net/http" | |
"net/url" | |
"strconv" |
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 main | |
import ( | |
"websocket" | |
"http" | |
"fmt" | |
"io" | |
) | |
func EchoServer(ws *websocket.Conn) { |
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 main | |
import ( | |
"encoding/xml" | |
"fmt" | |
"log" | |
) | |
const data = `<Note> | |
<To>Tove</To> |
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
"""I suspect that there is a race condition in datetime module. | |
When I ran the following code in a multi-threading application: | |
datetime.datetime.strptime('20120509100335', "%Y%m%d%H%M%S") | |
I've noticed the following error in the log. | |
Traceback (most recent call last): | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner |
OlderNewer