Note: these instructions are for pre-Sierra MacOS. Sierra (10.12) and newer users see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow
If you are getting this in gdb on OSX while trying to run a program:
Installing collected packages: requests | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import requests | |
from datetime import datetime |
@-moz-document domain("baidu.com") { | |
body { | |
display: none; | |
} | |
html { | |
margin: 30px; | |
} | |
html::after { |
Note: these instructions are for pre-Sierra MacOS. Sierra (10.12) and newer users see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow
If you are getting this in gdb on OSX while trying to run a program:
import React from 'react' | |
import ReactDOM from 'react-dom' | |
const Hello = ({name}) => <h1>Hello {name}!</h1> | |
ReactDOM.render( | |
<Hello name={"vjeux"}/>, | |
document.body.appendChild(document.createElement("div")) | |
) |
# Requires Python 2.x, flask and pywin32 | |
from flask import Flask | |
import flask | |
import win32com.client | |
import pythoncom | |
import os, os.path, sys, time | |
# Flask (Web Server) | |
ws = Flask(__name__) |
Intent intent = new Intent(Intent.ACTION_VIEW); | |
ComponentName cn = new ComponentName("com.tencent.mm", "com.tencent.mm.plugin.base.stub.WXCustomSchemeEntryActivity"); | |
intent.setData(Uri.parse("weixin://dl/moments")); | |
intent.setFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP); | |
intent.setComponent(cn); | |
startActivity(intent); |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
module Language.Brainfuck.Parser | |
(parse) | |
where | |
import Control.Monad.Except | |
import Control.Monad.State | |
data ParseError = Unexpected Char |
# 支持 MacOS, ext4 文件系统的 Linux | |
# 参考:http://moiseevigor.github.io/software/2015/01/30/get-file-creation-time-on-linux-with-ext4/ | |
# | |
def creation_time(file_path) | |
case RUBY_PLATFORM | |
when /bsd/, /darwin/ | |
return %x{mdls -raw -name kMDItemFSCreationDate #{file_path}} | |
when /linux/ | |
inode = %x{ls -di "#{file_path}" | cut -d ' ' -f 1}.strip | |
fs = %x{df "#{file_path}" | tail -1 | awk '{print $1}'}.strip |
swagger: '2.0' | |
info: | |
title: OpenBazaar API | |
description: Let's make trade free | |
version: "1.0.0" | |
# the domain of the service | |
host: localhost | |
# array of all schemes that your API supports | |
schemes: | |
- http |