Run this command periodically to clean loose objects and compress stuff.
git gc --aggressive
List all local branches sorted by last commit date, oldest last
import UIKit | |
// Detect if the app is running unit tests. | |
// Note this only detects unit tests, not UI tests. | |
func isRunningUnitTests() -> Bool { | |
let env = NSProcessInfo.processInfo().environment | |
if let injectBundle = env["XCInjectBundle"] { | |
return NSString(string: injectBundle).pathExtension == "xctest" | |
} | |
return false |
FB.ui( | |
{ | |
method: 'friends.add', | |
id: fbid // assuming you set this variable previously... | |
}, | |
function(param){ | |
console.log(param); |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
import 'package:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
import 'dart:math'; | |
void main() => runApp( | |
ChangeNotifierProvider( | |
create: (_) => ThemeProvider(), | |
child: const MyApp(), | |
), | |
); |
A sample of creating a custom drawable, both in xml and via code. |
Source of original vim config: https://github.com/apple/swift/tree/master/utils/vim
# use `svn checkout…` to grab just the subfolder from github
svn checkout https://github.com/apple/swift/trunk/utils/vim
# rename to something a bit more specific
mv vim vim-swift
cd vim-swift
rm -rf .svn
# init git
To find all ancestor branches
./get_ancestor_branches.sh
To create the delete commands for all ancestor branches and echo them as text (not invoking them)
(assuming you are paying cash)