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
### Keybase proof | |
I hereby claim: | |
* I am moallemi on github. | |
* I am moallemi (https://keybase.io/moallemi) on keybase. | |
* I have a public key whose fingerprint is AF2E 72F5 82B0 5D4D EECC 0D5F C81F 1C03 33D1 3238 | |
To claim this, I am signing this object: |
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
[alias] | |
st = status | |
d = diff | |
dh = diff HEAD | |
co = checkout | |
sp = submodule foreach git pull | |
ci = commit | |
mq = merge --squash | |
amend = commit --amend --no-edit |
Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.
- Go to: https://twitter.com/{username}/likes
- Open the console and run the following JavaScript code:
setInterval(() => {
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
d.click()
}
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
data class Shop(val name: String, val customers: List<Customer>) | |
data class Customer(val name: String, val city: City, val orders: List<Order>) | |
data class Order(val products: List<Product>, val isDelivered: Boolean) | |
data class Product(val name: String, val price: Double) | |
data class City(val name: String) |
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
body, | |
#container { | |
font-family: 'Segoe UI', 'Verdana', 'Arial', 'iransans', sans-serif; | |
} | |
textarea, | |
p { | |
font-family: "Droid Sans", "iranian sans", iransans !important; | |
line-height: 25px; | |
} |
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
func fetchPhotos() async throws -> [Photo] { | |
let url = URL(string: "https://api.unsplash.com/photos?order_by=popular&orientation=squarish&per_page=40")! | |
var request = URLRequest(url: url) | |
request.addValue("Client-ID REPLACE_WITH_ACCESS_KEY", forHTTPHeaderField: "Authorization") | |
let (data, _) = try await URLSession.shared.data(for: request) | |
let photos = try JSONDecoder().decode([Photo].self, from: data) | |
return photos | |
} |
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
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.withContext | |
import okhttp3.OkHttpClient | |
import okhttp3.Request | |
suspend fun fetchPhotos(): List<Photo> = withContext(Dispatchers.IO){ | |
val client = OkHttpClient() | |
val request = Request.Builder() | |
.url("https://api.unsplash.com/photos?order_by=popular&orientation=squarish&per_page=40") |