- Ubuntu 14.04, 16.04, or 16.10
- Open up terminal
- Install core deps:
sudo apt-get install clang libicu-dev git
#import "ViewController.h" | |
#import <AFNetworking/AFNetworking.h> | |
@interface ViewController () | |
@end | |
static dispatch_queue_t _queue; | |
@implementation ViewController |
#import "ViewController.h" | |
#import <AFNetworking/AFNetworking.h> | |
@interface ViewController () | |
@end | |
static dispatch_queue_t _queue; | |
static dispatch_semaphore_t _semphore; |
extension Character { | |
func isHanzi() -> Bool { | |
if ("\u{4E00}" <= self && self <= "\u{9FA5}") { | |
return true | |
}else { | |
return false | |
} | |
} | |
} |
#!/bin/bash | |
limit="${1-10000000}"; | |
echo "Keeping SourceKitService below $limit KiB of virtual memory." | |
echo "Hit ^C to quit." | |
while true; do | |
sleep 1; | |
p=`pgrep ^SourceKitService$` | |
if [ -n "$p" ]; then | |
vsz=`ps -o vsz -p "$p" | tail -1` |
#!/usr/bin/env bash | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
service mysql restart && bash |
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> | |
#import <unistd.h> | |
BOOL copy_to_clipboard(NSString *path) | |
{ | |
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage | |
NSImage * image; | |
if([path isEqualToString:@"-"]) | |
{ | |
// http://caiustheory.com/read-standard-input-using-objective-c |
import Foundation | |
class CallRollTool { | |
static private var outMark = 0 | |
static private var inMark = 0 | |
static func call(interval: TimeInterval = 0.5, _ callBack:@escaping (()->())){ | |
outMark += 1 | |
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + interval) { | |
inMark += 1 |
return new Scaffold( | |
appBar: new AppBar( | |
title: new Text("Project Details"), | |
backgroundColor: Colors.blue[800]), | |
body: | |
new CustomScrollView( | |
slivers: <Widget>[ | |
new SliverPadding(padding: const EdgeInsets.only(left: 10.0,right: 10.0, | |
top: 10.0,bottom: 0.0), | |
sliver: new SliverList(delegate: |
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(new TestApp()); | |
} |