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
module Main where | |
import Prelude | |
import Effect (Effect) | |
import Effect.Console (log) | |
import TryPureScript (render, withConsole) | |
main :: Effect Unit | |
main = render =<< withConsole do | |
log "Hello, world!" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project> | |
<Choose> | |
<When Condition="'$(OS)' == 'Windows_NT'"> | |
<PropertyGroup> | |
<BaseIntermediateOutputPath>B:/$(MSBuildProjectFile) Intermediate/</BaseIntermediateOutputPath> | |
<OutputPath>B:/$(MSBuildProjectFile) Output/$(Configuration)/</OutputPath> | |
</PropertyGroup> | |
</When> | |
<Otherwise> |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Rake", | |
"type": "Ruby", | |
"request": "launch", | |
"cwd": "${workspaceRoot}", | |
"program": "/usr/bin/rake", | |
"env": { |
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
require 'active_support/core_ext/hash/conversions' | |
require 'yaml' | |
source_file_path='/path/to/file.xml' | |
target_file_path='/path/to/file.yaml' | |
File.write(target_file_path, Hash.from_xml(File.read(source_file_path)).to_yaml) |
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 mark - Simple Unit Test | |
- (void)test_callSomeoneWith_giveSomething_getSomething { | |
MyClass *sut = [MyClass new]; | |
NSString *input = @„give something“; | |
NSString *expectedResult = @„get something“; | |
NSString *result = [sut callSomeoneWith:input]; | |
XCTAssertEqualObjects(result, expectedResult); | |
} |
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
#!/usr/bin/env ruby | |
# This will compile the given Swift script and run it | |
unless ARGV.count == 1 | |
puts "Please provide the path for the Swift source file to compile and run" | |
exit -1 | |
end | |
SOURCE_FILE = ARGV[0] | |
BASE_NAME = File.basename(SOURCE_FILE, ".swift") |
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
expr -l Swift -- import UIKit | |
expr -l Swift -- let $webview = unsafeBitCast(0x7b500026ca00, to: UIWebView.self) | |
expr -l Swift -- print($webview.request.url) |
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
# brew install cloc | |
cloc --csv --csv-delimiter=";" --report-file=~/Desktop/output.csv . |
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
var simulateScrollingTimer: Timer? | |
var scrollUp = false | |
private func simulateScrolling() { | |
collectionView.contentOffset = CGPoint.zero | |
scrollUp = false | |
simulateScrollingTimer = Timer.scheduledTimer(timeInterval: 0.5, target: self, selector: #selector(simulateSwipe), userInfo: nil, repeats: true) | |
} | |
private func simulateSwipe() { | |
guard collectionView.contentSize.height > 0 |
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
class MyClass {} | |
let anObject = MyClass() | |
print("The address of anObject is \(ObjectIdentifier(anObject))") |
NewerOlder