Skip to content

Instantly share code, notes, and snippets.

View franzwarning's full-sized avatar

Raymond Kennedy franzwarning

View GitHub Profile
@gajeshbhat
gajeshbhat / strToInt.py
Last active October 31, 2023 19:41
Convert k to Integer thousand Python.
def convert_str_to_number(x):
total_stars = 0
num_map = {'K':1000, 'M':1000000, 'B':1000000000}
if x.isdigit():
total_stars = int(x)
else:
if len(x) > 1:
total_stars = float(x[:-1]) * num_map.get(x[-1].upper(), 1)
return int(total_stars)
@brennanMKE
brennanMKE / EventEmitter.swift
Last active March 7, 2024 04:04
React Native Event Emitter for RCTEventEmitter in Objective-C and Swift
class EventEmitter
/// Shared Instance.
public static var sharedInstance = EventEmitter()
// ReactNativeEventEmitter is instantiated by React Native with the bridge.
private static var eventEmitter: ReactNativeEventEmitter!
private init() {}
@devStepsize
devStepsize / slack_webhook_post.py
Last active August 7, 2023 09:28
POST a JSON payload to a Slack Incoming Webhook using Python requests
'''
This is an example of how to send data to Slack webhooks in Python with the
requests module.
Detailed documentation of Slack Incoming Webhooks:
https://api.slack.com/incoming-webhooks
'''
import json
import requests
@lopspower
lopspower / README.md
Last active June 28, 2024 13:35
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store