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
+ | |
+ <div class="page"> | |
+ <ul class="tabs"> | |
+ <li class="tab" onclick="{TabChanged Title}">Hello</li> | |
+<li class="tab" onclick="{TabChanged Title}">Goodbye</li> | |
+ | |
+ </ul> | |
+ <div class="content"> | |
+ <p>hello world</p> | |
+ </div> |
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 ( | |
"fmt" | |
"github.com/alecthomas/participle" | |
"github.com/alecthomas/repr" | |
) | |
type CLI struct { |
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
Currently, it works. | |
``` | |
➤ echo 'field2; field1; @f3 = foo(1,2);' | go run main.go | |
&main.FieldExprs{ | |
Exprs: []*main.FieldExpr{ | |
&main.FieldExpr{ | |
Field: &"field2", | |
}, | |
&main.FieldExpr{ |
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 sublime | |
import sublime_plugin | |
class DayAndNightCommand(sublime_plugin.ApplicationCommand): | |
def run(self): | |
s = sublime.load_settings("Preferences.sublime-settings") | |
if s.get("theme") == "Reverse Gravity.sublime-theme": | |
print("Switching to dark theme") | |
s.set("theme", "Gravity.sublime-theme") |
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
#include <utility> | |
#include <thread> | |
#include <limits> | |
#include <algorithm> | |
#include <cassert> | |
#include <vector> | |
#include <cstdint> | |
#include <iostream> | |
#include <mutex> | |
#include <future> |
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
#include <iostream> | |
#include <mutex> | |
std::recursive_mutex log_lock; | |
// If you have ever tried using cerr/cout from multiple threads you may have experienced | |
// character interleaving. These functions avoid that. | |
template <typename A> | |
void log(const A &arg) { | |
log_lock.lock(); |
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
#include <condition_variable> | |
#include <thread> | |
#include <mutex> | |
#include <iostream> | |
#include <algorithm> | |
#include <type_traits> | |
#include <vector> | |
#include <cstdint> | |
#include <iterator> | |
#include <functional> |
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
// before | |
func CreateZipWithWriter(writer io.Writer, sourceRoot string) error { | |
zf := zip.NewWriter(writer) | |
defer zf.Close() | |
return filepath.Walk(sourceRoot, func(p string, info os.FileInfo, err error) error { | |
if err != nil || info.IsDir() { | |
return err | |
} | |
relPath, err := filepath.Rel(sourceRoot, p) | |
if err != nil { |
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
// | |
// Swift.IO | |
// | |
// Created by Alec Thomas on 25/02/2015. | |
// Copyright (c) 2015 SwapOff. All rights reserved. | |
// | |
// | |
// This file provides a consistent, simple interface to stream-based data sources. | |
// It is based on Go's I/O library. | |
// |
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
#pragma once | |
#include <string> | |
#include <unordered_set> | |
#include "entityx/Entity.h" | |
#include "entityx/Event.h" | |
class Groups : public entityx::Receiver<Groups> { | |
public: |
NewerOlder