Skip to content

Instantly share code, notes, and snippets.

View Axure's full-sized avatar
😃
Time is money

Hu Zheng Axure

😃
Time is money
View GitHub Profile
@Axure
Axure / graphql-decorators-before.ts
Last active November 28, 2017 15:49 — forked from anonymous/graphql-decorators.ts
GraphQL with decorators.
export const rootMutationType = new GraphQLObjectType({
name: 'MutationRoot',
fields: () => ({
addWord1: {
args: {
value: {
name: 'value',
type: new GraphQLNonNull(GraphQLString),
},
},
@Axure
Axure / Interpreter.scala
Created March 25, 2017 20:44 — forked from ezksd/Interpreter.scala
interpreter
package ezksd
import ezksd.Parser.parse
object Interpreter {
type Continuation[T] = T => Unit
@inline
def cps_map(l: List[Any], f: (Any, Any => Unit) => Unit, k: Continuation[List[Any]]) {
@Axure
Axure / relay.d.ts
Created July 19, 2016 10:33 — forked from guncha/relay.d.ts
Very basic Relay typings for Typescript
declare module 'react-relay' {
// fragments are a hash of functions
interface Fragments {
[query: string]: ((variables?: RelayVariables) => string)
}
interface CreateContainerOpts {
initialVariables?: Object
prepareVariables?(prevVariables: RelayVariables): RelayVariables
@Axure
Axure / FindSSE.cmake
Created January 5, 2016 07:05 — forked from hideo55/FindSSE.cmake
CMake module that detect SSE support
# Check if SSE instructions are available on the machine where
# the project is compiled.
MACRO (FindSSE)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
STRING(REGEX REPLACE "^.*(sse2).*$" "¥¥1" SSE_THERE ${CPUINFO})
STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
@Axure
Axure / javascript-static-analysis-tools.md
Last active September 21, 2015 04:11 — forked from listochkin/javascript-static-analysis-tools.md
JavaScript Static Analysis Tools

JavaScript Static Analysis Tools

Most people are familiar with these three tools:

  1. [JSHint][1]
  2. [JSLint][2]
  3. [Google Closure Linter][3]

The first one is more popular among developers because it is style-agnostic. The other two enforce rules of [Crockford Style][4] and [Google Code Style][5] respectively.

@Axure
Axure / backend-architectures.md
Last active September 14, 2015 05:34 — forked from ngocphamm/backend-architectures.md
Backend Architectures
@Axure
Axure / README.md
Last active September 7, 2015 20:15 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@Axure
Axure / nginxproxy.md
Last active September 7, 2015 19:23 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@Axure
Axure / yosemite ntfs read+write.txt
Last active August 29, 2015 14:28 — forked from bjorgvino/yosemite ntfs read+write.txt
osxfuse + ntfs-3g + Yosemite = NTFS R/W
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@Axure
Axure / carbon.css
Last active August 29, 2015 14:27 — forked from dfeng/carbon.css
Reddit Carbon (for Chrome)
body{
background:#1a1a1a;
color:#ddd
}
.comment .usertext .md p>a:visited,.md a,.res.res-nightmode .tagline a,a,h2 a:visited{
color:#3498db;
-webkit-transition:color .15s ease-in-out;
-moz-transition:color .15s ease-in-out;
-o-transition:color .15s ease-in-out;