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
diff --git a/tim.cc b/tim.cc | |
index 4d8200e..f6cfc19 100644 | |
--- a/tim.cc | |
+++ b/tim.cc | |
@@ -16,7 +16,11 @@ | |
#include <stdlib.h> | |
#include <windows.h> | |
+#include <psapi.h> // Must be after windows.h | |
+ |
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
Nicos-MacBook-Pro:hack thakis$ clang -o xmltest xmltest_libxml.cc -I$(xcrun -show-sdk-path)/usr/include/libxml2 -lxml2 && ./xmltest xmltest_in.xml | |
xmltest_in.xml:3: namespace warning : xmlns: URI foo is not absolute | |
<hi xmlns="foo" xmlns:x="bar"> | |
^ | |
1/XML_ELEMENT_NODE hi (null) | |
3/XML_TEXT_NODE text | |
1/XML_ELEMENT_NODE hi (null) ((null):foo XML_NAMESPACE_DECL) (x:bar XML_NAMESPACE_DECL) | |
def ns: ((null):foo XML_NAMESPACE_DECL) (x:bar XML_NAMESPACE_DECL) 3/XML_TEXT_NODE text | |
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
C:\src\hack>type xmltest_in.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<?xml-stylesheet href="common.css"?> | |
<hi> | |
<hi xmlns="http://example.com/foo-ns" xmlns:x="urn:example-com:bar-ns"> | |
<?foobar version="1.0"?> | |
<ho | |
/>text&more@<x:ho x:attr="adsf"/> | |
<!-- adsf --> | |
</hi> |
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
import Adafruit_SSD1306 | |
import struct | |
import sys | |
import termios | |
from PIL import Image | |
from PIL import ImageFont | |
from PIL import ImageDraw | |
# 128x64 display with hardware I2C: | |
disp = Adafruit_SSD1306.SSD1306_128_64(rst=24) |
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
Chrome at #704646 | |
LLVM at r374370 | |
Llvm args.gn | |
llvm_targets_to_build = "all" | |
clang_base_path = "c:/src/chrome/src/third_party/llvm-build/Release+Asserts" | |
use_goma = true | |
Chrome args.gn |
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
Mostly superceded by https://github.com/nico/llvm-project/commit/c43875075d15a58e674792b45b0e96d721296aed | |
commit 02c27a95ecc0555ba30c363321cc62459e469bff | |
Author: Nico Weber <[email protected]> | |
Date: Fri Jun 15 16:54:38 2018 -0400 | |
demo for running check-clang on swarming (tested on mac only) | |
Use like so: | |
# Instant: |
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
diff --git a/llvm/include/llvm/Demangle/MicrosoftDemangle.h b/llvm/include/llvm/Demangle/MicrosoftDemangle.h | |
index c6f26061bed..96d015f2ded 100644 | |
--- a/llvm/include/llvm/Demangle/MicrosoftDemangle.h | |
+++ b/llvm/include/llvm/Demangle/MicrosoftDemangle.h | |
@@ -202,7 +202,7 @@ private: | |
QualifiedNameNode *demangleNameScopeChain(StringView &MangledName, | |
IdentifierNode *UnqualifiedName); | |
- IdentifierNode *demangleNameScopePiece(StringView &MangledName); | |
+ Node *demangleNameScopePiece(StringView &MangledName); |
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
# cmake -P foo.cmake | |
include(FindPythonInterp) | |
#set(FOO_DIR "/Users/thakis/blah") | |
set(FOO_DIR "/Users/thakis/blah" CACHE STRING "wsdf") | |
function(configure_lit_site_cfg site_in site_out) | |
cmake_parse_arguments(ARG "" "" "MAIN_CONFIG;OUTPUT_MAPPING;PATHS" ${ARGN}) |
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
# Works with py2 and py3 | |
import ctypes | |
import os | |
import sys | |
libSystem = ctypes.CDLL('libSystem.dylib') | |
spawn = libSystem.posix_spawnp | |
spawn.restype = ctypes.c_int | |
spawn.argtypes = ( |
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
import ctypes | |
import os | |
import sys | |
libSystem = ctypes.CDLL('libSystem.dylib') | |
# `typedef void *posix_spawnattr_t;` on darwin | |
attrp = ctypes.c_void_p() | |
e = libSystem.posix_spawnattr_init(ctypes.byref(attrp)) | |
print('spawnattr init ret:', e) |