I hereby claim:
- I am carlosefonseca on github.
- I am carlosefonseca (https://keybase.io/carlosefonseca) on keybase.
- I have a public key ASDHkAU3TdmjHLMVB__Gh8YJ_T6Jb-j1bwobXg8exgIukAo
To claim this, I am signing this object:
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: cyan; icon-glyph: wallet; | |
// Card Number | |
const prizeCardAmount = (await prizeCard("1234567890123456")).amount | |
// Username, Password, Date | |
const daCardAmount = (await daCard("username", "password", "31081980")) |
var setDate = new Date("2019-01-01"); | |
var today = new Date(); | |
var dateDiv = document.getElementById("date") | |
if (dateDiv === null) { | |
dateDiv = document.createElement("div") | |
dateDiv.id = "date" | |
dateDiv.style = "float: left; margin-left: 30px; margin-top: 15px;" | |
$("#total").parent().append(dateDiv) | |
} |
// Follow this to install the travis cli: https://github.com/travis-ci/travis.rb#installation | |
// Then generate the API token by running the following commands and place the token in the var | |
// travis login --pro | |
// travis token --pro | |
let travis_token = "insert token" | |
// set to your GitHub username to appear in bold | |
let github_user = "" |
import Foundation | |
public struct Something: Equatable { | |
var id: String? | |
var data: String | |
public init(id: String? = nil, data: String) { | |
self.id = id | |
self.data = data | |
} |
sim_set_pt_booted() { | |
for d in $(xcrun simctl list devices booted | grep Booted | perl -pe "s/.*\(([^ ]+)\) \(Booted\)/\1/") | |
do | |
echo -n $d | |
/usr/libexec/PlistBuddy -c "Set :AppleKeyboards:2 pt_PT@sw=QWERTY;hw=Automatic" -c "Set :AppleLanguages:1 pt-PT" -c "Set :AppleKeyboards:3 pt_PT@sw=QWERTY;hw=Automatic" ~/Library/Developer/CoreSimulator/Devices/$d/data/Library/Preferences/.GlobalPreferences.plist | |
# This is reset on restart (last checked on iOS 13.7) | |
/usr/libexec/PlistBuddy -c "Set :AutomaticMinimizationEnabled false" ~/Library/Developer/CoreSimulator/Devices/$d/data/Library/Preferences/com.apple.Preferences.plist | |
echo " Files patched. Restarting device… " | |
xcrun simctl shutdown $d |
const res = pm.response.json(); | |
// The list to show | |
const list = res["_embedded"].contacts | |
// Keys to ignore | |
const ignore = ["account_id", "deleted_at"] | |
// Implementation |
I hereby claim:
To claim this, I am signing this object:
import android.graphics.Color | |
import android.support.annotation.ColorInt | |
import android.support.v4.graphics.ColorUtils | |
/** | |
* Convert the ARGB color to its HSV components. | |
*/ | |
class HSVColor(@ColorInt color: Int) { | |
val hsv = FloatArray(3).apply { Color.colorToHSV(color, this) } |
// | |
// JKInterpolationMath.h | |
// | |
// Created by Carlos Fonseca on 08/11/15. | |
// Copyright © 2015 Carlos Fonseca. All rights reserved. | |
// | |
import Foundation | |
func JKLinearInterpolation(t:Float, start:Float, end:Float) -> Float |
// Playground - noun: a place where people can play | |
import UIKit | |
var d1 = Dictionary<String, NSMutableArray>() | |
var d2 = Dictionary<String, String[]>() | |
d1["A"] = NSMutableArray(object: "A1") | |
d1 // ["A": ["A1"]] |