Skip to content

Instantly share code, notes, and snippets.

View fcaldarelli's full-sized avatar

Fabrizio Caldarelli fcaldarelli

View GitHub Profile
Download the desired file
Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
Convert the .iso file to .img using the convert option of hdiutil:
hdiutil convert -format UDRW -o /path/to/target.img /path/to/source.iso
Note: OS X tends to put the .dmg ending on the output file automatically. Rename the file by typing:
mv /path/to/target.img.dmg /path/to/target.img
Run diskutil list to get the current list of devices
Insert your flash media
Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command - in the previous example, N would be 2)
./node_modules/.bin/react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
package com.tie;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
public class SplashActivity extends AppCompatActivity {
@Override
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
baseUrl: 'https://example.com',
url: 'https://example.com/strapi',
admin: {
url: 'https://example.com/strapi/admin'
}
});
- [email protected]:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- variant: "$VARIANT"
# From Docker container
ssh -nNT -L /var/run/mysqld/mysqld.sock:remotehost:3306 -i <cert.pem> ubuntu@ssh_host
# From Docker container, php config
$db = new PDO( sprintf("mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=%s", $config['db']['database']), $config['db']['username'], $config['db']['password']);
https://accounts.google.com/DisplayUnlockCaptcha
1) Go to https://github.com/settings/tokens
2) Click "Generate new token"
3) Input token description e.g. "Sourcetree Mac Token", select "repo" checkbox, and click "Generate token"
4) Copy the generated token
5) Add your GitHub account to Sourcetree, but now rather than using OAuth, select Basic authentication
6) Input your username
7) Paste the generated token as passwor
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
guard let headerView = tableView.tableHeaderView else {
return
}
// The table view header is created with the frame size set in
// the Storyboard. Calculate the new size and reset the header
// view to trigger the layout.