Skip to content

Instantly share code, notes, and snippets.

View colinta's full-sized avatar
🏠
Working from home

Colin T.A. Gray colinta

🏠
Working from home
View GitHub Profile
export const Breathe = () => {
const progress = useLoop(
{
duration: 3000,
easing: Easing.inOut(Easing.ease),
},
{ yoyo: true }
);
return (
<Canvas style={styles.container} debug>
import {Canvas, Circle} from "@shopify/react-native-skia";
export const HelloWorld = () => {
const r = 128;
return (
<Canvas style={{ flex: 1 }}>
<Circle r={r} cx={r} cy={r} color="cyan" />
</Canvas>
);
};
import {Skia, SkiaView, useDrawCallback} from "@shopify/react-native-skia";
export const HelloWorld = () => {
const r = 128;
const onDraw = useDrawCallback((canvas) => {
const paint = Skia.Paint();
paint.setAntiAlias(true);
cyan.setColor(Skia.Color("cyan"));
canvas.drawCircle(r, r, r, paint);
});
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index db9a34a..e95b882 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -165,7 +165,7 @@ def use_react_native_codegen!(spec, options={})
return if ENV['DISABLE_CODEGEN'] == '1'
# The path to react-native (e.g. react_native_path)
- prefix = options[:path] ||= File.join(__dir__, "..")
+ prefix = options[:path] ||= "../../node_modules/react-native"
character = {
'name': 'Catina Turner',
'class': 'Artificer',
'ancestry': 'Reborn (Leonin)',
'background': 'Entertainer',
'speed': 30,
'hit_dice': 8,
'scores': {
"Strength": 8,
"Dexterity": 12,
async function foo() {
console.log('foo');
return 'foo';
}
function bar() {
return new Promise(resolve => {
console.log('bar');
resolve('bar');
});
@colinta
colinta / letmeexplain.md
Created May 7, 2013 15:49
Here's what I mean when I say "ReactiveCocoa is just a fancy word for: 'DSL'"

I don't want anyone to think that I am not a big fan of ReactiveCocoa. I'm a HUGE FAN of it!

But look how LONG it took for something like this to come about. Cocoa is an OLD OLD system, and even though KVO/KVC wasn't there at the birth, it has been there at least a decade. I pretty much gave up on Obj-C in favor of RubyMotion, and look at our landscape: Futuristic, ProMotion, Formotion, Geomotion, Elevate, Teacup - all of these projects bring expressiveness to Cocoa, and RubyMotion is barely a year old.

So what I meant to say is that Obj-C suffers from a lack of expressiveness - this has nothing to do with ReactiveCocoa, that's just my example. To illustrate my point, I will translate the first example of the ReactiveCocoa README. I encourage you to read the ReactiveCocoa source and try and consolidate all the code that is used to handle this function. I will include all of the Ruby code that is necessary for my translation to work.

I do have one qualm with ReactiveCocoa: the names. I'm going to t

return (
<View
style={{
flex: 1,
alignItems: "center",
justifyContent: "center",
}}
>
<View
style={{
const render: FunctionComponent<Props> = (props) => {
return (
<View style={{
flex: 1,
flexDirection: "column",
justifyContent: "flex-start",
alignItems: "flex-start",
}}>
<View
style={{
Verifying my Blockstack ID is secured with the address 14qr6rD7oYF4Qz9JMa2637RCc2pCLk9SvZ https://explorer.blockstack.org/address/14qr6rD7oYF4Qz9JMa2637RCc2pCLk9SvZ