$ sudo apt-get update
$ sudo apt-get install libffi6
This file contains hidden or 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
require 'faraday' | |
# Amazon S3 presinged url | |
url = "https://<bucket-name>.s3.amazonaws.com/path-to-file/1.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZTZBLMH3LBZ3WP5M%2F20211214%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211214T170722Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=d5929354744cb5d20102d92496c3b9e24a71dfd75535f4eee371979c2636f473" | |
response = Faraday.new(url).put("/path-to-file/1.txt") do |req| | |
req.body = File.binread("/Users/harshal/Temp/Trash/6.txt") | |
end | |
puts response.body |
This file contains hidden or 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
let currentDevice = UIDevice.current | |
print("name: \(currentDevice.name)") | |
print("systemName: \(currentDevice.systemName)") | |
print("systemVersion: \(currentDevice.systemVersion)") | |
print("model: \(currentDevice.model)") | |
print("localizedModel: \(currentDevice.localizedModel)") | |
print("userInterfaceIdiom: \(currentDevice.userInterfaceIdiom.rawValue)") | |
if let identifierForVendor = currentDevice.identifierForVendor { | |
print("identifierForVendor: \(identifierForVendor)") |
This file contains hidden or 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
# Output 1 | |
Build.BOARD : msm8953 | |
Build.BOOTLOADER : 0xC212 | |
Build.BRAND : motorola | |
Build.SUPPORTED_ABIS (Needs > LOLLIPOP) : [Ljava.lang.String;@da140ec | |
Build.DEVICE: sanders_n | |
Build.DISPLAY : OPS28.65-36-14 | |
Build.FINGERPRINT : motorola/sanders_n/sanders_n:8.1.0/OPS28.65-36-14/63857:user/release-keys | |
Build.HARDWARE : qcom |
This file contains hidden or 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
D, [2020-12-19T08:12:50.286546 #61072] DEBUG -- : (0.0ms) begin transaction | |
D, [2020-12-19T08:12:50.286771 #61072] DEBUG -- : User Create (0.1ms) INSERT INTO "users" ("name") VALUES (?) [["name", "First"]] | |
D, [2020-12-19T08:12:50.286964 #61072] DEBUG -- : (0.0ms) commit transaction | |
D, [2020-12-19T08:12:50.287390 #61072] DEBUG -- : (0.0ms) begin transaction | |
D, [2020-12-19T08:12:50.287502 #61072] DEBUG -- : User Create (0.0ms) INSERT INTO "users" ("name") VALUES (?) [["name", "Second"]] | |
D, [2020-12-19T08:12:50.287612 #61072] DEBUG -- : (0.0ms) commit transaction | |
D, [2020-12-19T08:12:50.287852 #61072] DEBUG -- : (0.0ms) begin transaction | |
D, [2020-12-19T08:12:50.287956 #61072] DEBUG -- : User Create (0.0ms) INSERT INTO "users" ("name") VALUES (?) [["name", "Third"]] | |
D, [2020-12-19T08:12:50.288063 #61072] DEBUG -- : (0.0ms) commit transaction | |
D, [2020-12-19T08:12:50.290632 #61072] DEBUG -- : (0.0ms) begin transaction |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> | |
<plist version="0.9"> | |
<dict> | |
<key>DisplayProductID</key> | |
<integer>1815</integer> | |
<key>DisplayVendorID</key> | |
<integer>1970170734</integer> | |
<key>tinf</key> | |
<dict> |
This file contains hidden or 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
// before | |
binding.nicknameText.text = binding.nicknameEdit.text | |
binding.nicknameEdit.visibility = View.GONE | |
binding.doneButton.visibility = View.GONE | |
binding.nicknameText.visibility = View.VISIBLE | |
// after | |
binding.apply { | |
nicknameText.text = nicknameEdit.text.toString() | |
nicknameEdit.visibility = View.GONE |
This file contains hidden or 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
# ~/.bash_logout: executed by bash(1) when login shell exits. | |
# when leaving the console clear the screen to increase privacy | |
if [ "$SHLVL" = 1 ]; then | |
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q | |
fi |
This file contains hidden or 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
{ | |
"kind": "youtube#videoListResponse", | |
"etag": "ulocFefetbr7j8hsb7PP6JJlGUw", | |
"items": [ | |
{ | |
"kind": "youtube#video", | |
"etag": "SAxWY45YrAno4X9baF1UxgQGFbQ", | |
"id": "Ks-_Mh1QhMc", | |
"snippet": { | |
"publishedAt": "2012-10-01T15:27:35Z", |
This file contains hidden or 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
--- | |
- hosts: all | |
become: true | |
vars: | |
package: vim # Deifines a global variables that can be used across the playbook | |
packages: [ 'vim', 'git', 'curl' ] # Stor array in a variable | |
doc_root: /var/www/example | |
tasks: | |
# Installing a single package | |
- name: Install a single Package |
NewerOlder