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
# -> For a Blender 2.8+ version, go to https://gist.github.com/p2or/2947b1aa89141caae182526a8fc2bc5a | |
# https://blender.stackexchange.com/q/57306/3710, https://blender.stackexchange.com/q/79779/3710 | |
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# |
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
is_iPhone = Framer.Device.deviceType.includes "apple-iphone" | |
is_iPhonePlus = Framer.Device.deviceType.includes "plus" | |
is_iPhoneNotPlus = is_iPhone and not is_iPhonePlus | |
if is_iPhonePlus and Utils.isFramerStudio() then Framer.Device.content.scale = 3 | |
if is_iPhoneNotPlus and Utils.isFramerStudio() then Framer.Device.content.scale = 2 | |
document.querySelector("head>meta[name=viewport]").setAttribute "content", | |
"width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no" | |
Framer.Device._update() |
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
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
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
// Returns a random Emoji 🌿 | |
extension String{ | |
func randomEmoji()->String{ | |
let range = 0x1F601...0x1F64F | |
let ascii = range.startIndex + Int(arc4random_uniform(UInt32(range.count))) | |
let emoji = String(UnicodeScalar(ascii)) | |
return emoji | |
} | |
} |
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
//wearversion | |
//wearlog | |
//wearvoiceinputenable | |
//wearvoiceinputdisable | |
//weargoogleapi | |
//assert | |
//pushassert | |
//uplog | |
//upcrash | |
//switchnotificationstatus |
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
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
}; | |
NodeList.prototype.__proto__ = Array.prototype; |
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 device = (function () { | |
var device = {}; | |
var ua = navigator.userAgent; | |
var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); | |
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); | |
var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); | |
var iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/); | |
device.ios = device.android = device.iphone = device.ipad = false; |
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 QcValueConverter = { | |
tensionFromQcValue: function(qcValue) { | |
return (qcValue - 30.0) * 3.62 + 194.0; | |
}, | |
qcValueFromTension: function(tension) { | |
return (tension - 194.0) / 3.62 + 30.0; | |
}, | |
frictionFromQcValue: function(qcValue) { |