Skip to content

Instantly share code, notes, and snippets.

View sueLan's full-sized avatar
🎯
Focusing

RY Zheng sueLan

🎯
Focusing
View GitHub Profile
//Copyright (c) 2018 Michael Eisel. All rights reserved.
#import "CLRCallRecorder.h"
#import <dlfcn.h>
#import <libkern/OSAtomicQueue.h>
#import <pthread.h>
typedef struct {
void *ptr;
NSInteger number;
@andigu
andigu / 3DAnimation.js
Last active February 26, 2023 17:59
Advanced demo for panresponder
import React, {Component} from "react";
import {Animated, Dimensions, Easing, PanResponder, StyleSheet, View} from "react-native";
import {Card} from "./Card";
const {width: screenWidth, height: screenHeight} = Dimensions.get("window");
export class Sliding extends Component {
bottomPadding = 10;
data = new Array(20).fill({
name: "John Smith",
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active April 27, 2024 01:22
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@Ben-G
Ben-G / DynamicInit.swift
Last active May 27, 2023 13:30
Dynamically create instance based on type in Swift
protocol Initializable {
init()
}
class A : Initializable {
var content:String
required init() {
content = "TestContent"
}
@JosephPecoraro
JosephPecoraro / shell-execution.rb
Last active September 10, 2023 10:12
Shell Execution in Ruby
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Synchronous (blocking)
# Returns the output of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111