Skip to content

Instantly share code, notes, and snippets.

View ShawonAshraf's full-sized avatar
🐈
I'm simply not there.

Shawon Ashraf ShawonAshraf

🐈
I'm simply not there.
View GitHub Profile
@ShawonAshraf
ShawonAshraf / server.js
Created May 12, 2020 22:25
node-express-medium
import express from 'express';
import morgan from 'morgan';
import bodyParser from 'body-parser';
const app = express();
app.use(morgan('combined'));
app.use(bodyParser.json());
app.get('/', (req, res) => {
@ShawonAshraf
ShawonAshraf / stale.yml
Created April 30, 2020 14:48
Stale integration boilerplate
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
| x | y | C(x) | C(y) | C(x, y) | P(x) | P(y) | P(x, y) | PMI |
|-----------+-------+--------+--------+-----------+------------+-------------+-------------+---------|
| sunflower | seed | 37 | 24 | 6 | 0.00108073 | 0.000701016 | 0.000175259 | 7.85382 |
| sunflower | oil | 37 | 37 | 1 | 0.00108073 | 0.00108073 | 2.92099e-05 | 4.64436 |
| sunflower | field | 37 | 1 | 0 | 0.00108073 | 2.9209e-05 | 0 | 0 |
The state tree is the Longleaf Pine , the state flower is the Camellia .
The film largely consisted of a stick figure moving about and encountering all manner of morphing objects , such as a wine bottle that transforms into a flower .
Apollo changed her into an incense plant , either heliotrope or sunflower , which follows the sun every day .
Out of Hyacinthus ' blood , Apollo created a flower named after him as a memorial to his death , and his tears stained the flower petals with " " " " , meaning alas .
Cut flowers , nursery plants , tropical fish and birds for the pet trade are some of the ornamental products .
The orchid takes advantage of this mating arrangement to get the male bee to collect and disseminate its pollen ; parts of its flower not only resemble the appearance of sand bees , but also produce large quantities of the three alkanes in the same ratio as female sand bees .
Metonymy involves the use of the name of a subcomponent part as an abbreviation , or jargon , for the name of the whol
@ShawonAshraf
ShawonAshraf / PKGBUILD
Created December 12, 2019 00:47 — forked from naetherm/PKGBUILD
rocr-runtime
pkgname=rocr-runtime
pkgver=2.10.0
pkgrel=1
pkgdesc="ROCm HSA"
arch=(x86_64)
url="https://github.com/RadeonOpenCompute/ROCR-Runtime"
license=('unknown')
makedepends=(git cmake gcc ninja)
depends=('roct-thunk-interface')
source=("https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/roc-$pkgver.tar.gz")
import SwiftUI
struct CheckoutView: View {
@EnvironmentObject var order: Order
@State private var paymentType = 0
@State private var addLoyaltyDetails = false
@State private var loyaltyNumber = ""
@State private var tipAmount = 0
@State private var showingPaymentAlert = false
func setImage(from url: String) {
guard let imageURL = URL(string: url) else { return }
// just not to cause a deadlock in UI!
DispatchQueue.global().async {
guard let imageData = try? Data(contentsOf: imageURL) else { return }
let image = UIImage(data: imageData)
DispatchQueue.main.async {
self.imageView.image = image
@ShawonAshraf
ShawonAshraf / set-image.swift
Created September 3, 2019 15:59
Loading image from URL swift
@IBOutlet weak var imageView: UIImageView!
func setImageToImageView() {
fetchImage { (imageData) in
if let data = imageData {
// referenced imageView from main thread
// as iOS SDK warns not to use images from
// a background thread
DispatchQueue.main.async {
self.imageView.image = UIImage(data: data)
@ShawonAshraf
ShawonAshraf / fetch-image.swift
Created September 3, 2019 15:58
Image from URL in Swift
func fetchImage(from urlString: String, completionHandler: @escaping (_ data: Data?) -> ()) {
let session = URLSession.shared
let url = URL(string: image_url)
let dataTask = session.dataTask(with: url!) { (data, response, error) in
if error != nil {
print("Error fetching the image! 😢")
completionHandler(nil)
} else {
completionHandler(data)
@ShawonAshraf
ShawonAshraf / FontNames-iOS12.swift
Created August 26, 2019 21:00 — forked from tadija/FontNames-iOS-17.4.swift
iOS - All Font Names
/*
*** Academy Engraved LET ***
AcademyEngravedLetPlain
---------------------
*** Al Nile ***
AlNile
AlNile-Bold
---------------------
*** American Typewriter ***
AmericanTypewriter