yarn add react-native-configreact-native link react-native-config- Create
.envfiles for each configuration. Ex:.env.dev,.env.prod, etc Ex:
API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| getGreetingTime = (currentTime) => { | |
| if (!currentTime || !currentTime.isValid()) { return 'Hello'; } | |
| const splitAfternoon = 12; // 24hr time to split the afternoon | |
| const splitEvening = 17; // 24hr time to split the evening | |
| const currentHour = parseFloat(currentTime.format('HH')); | |
| if (currentHour >= splitAfternoon && currentHour <= splitEvening) { | |
| // Between 12 PM and 5PM | |
| return 'Good afternoon'; |
| #!/bin/bash | |
| : ${MJ_APIKEY_PUBLIC:="YOUR PUBLIC APIKEY HERE"} | |
| : ${MJ_APIKEY_PRIVATE:="YOUR PRIVATE APIKEY HERE"} | |
| : ${TEMPLATE:="291077"} | |
| : ${TO:='[email protected]'} | |
| : ${TO_NAME:='Testers'} | |
| : ${FROM:='[email protected]'} | |
| : ${FROM_NAME:='Your name'} | |
| : ${SUBJECT:="Email sent by script $0"} |
yarn add react-native-configreact-native link react-native-config.env files for each configuration. Ex: .env.dev, .env.prod, etc
Ex:API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| app.get('/posts', async (req, res) => { | |
| // destructure page and limit and set default values | |
| const { page = 1, limit = 10 } = req.query; | |
| try { | |
| // execute query with page and limit values | |
| const posts = await Posts.find() | |
| .limit(limit * 1) | |
| .skip((page - 1) * limit) | |
| .exec(); |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
| add_action( 'wp_enqueue_scripts', 'my_custom_script_load' ); | |
| function my_custom_script_load(){ | |
| wp_enqueue_script( 'my-custom-script', get_stylesheet_directory_uri() . '/custom-scripts', array( 'jquery' ) ); | |
| } |
| import sys | |
| from watchdog.observers import Observer | |
| from watchdog.events import FileSystemEventHandler | |
| import time | |
| class EventHandler(FileSystemEventHandler): | |
| def on_any_event(self, event): | |
| print("EVENT") | |
| print(event.event_type) | |
| print(event.src_path) |
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
| # Shell to use with Make | |
| SHELL := /bin/bash | |
| # Set important Paths | |
| PROJECT := # Set to your project name | |
| LOCALPATH := $(CURDIR)/$(PROJECT) | |
| PYTHONPATH := $(LOCALPATH)/ | |
| PYTHON_BIN := $(VIRTUAL_ENV)/bin | |
| # Export targets not associated with files |
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
On a mac you can use homebrew by running the command brew install pandoc.