List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
def manifest = new XmlSlurper().parse(file("./src/main/AndroidManifest.xml")) | |
def packageName = manifest.@package.text() | |
task copyAAR(type: Copy) { | |
from "$projectDir/build/outputs/aar/" | |
include 'android.aar' | |
into "$projectDir/AAR/" | |
rename 'android.aar', "${packageName}.aar" | |
doLast { |
// | |
// CSPManager.m | |
// Faktorin | |
// | |
// Created by Peter Litvinov on 10/18/18. | |
// Copyright © 2018 Facebook. All rights reserved. | |
// | |
#import "CSPManager.h" | |
#import <React/RCTLog.h> |
import axios from "axios"; | |
import { settings } from "../settings"; | |
import { authAPI } from "."; | |
const request = axios.create({ | |
baseURL: settings.apiV1, | |
}); | |
request.interceptors.request.use( | |
(config) => { |
import 'babel-core/polyfill'; // so I can use Promises | |
import fetch from 'isomorphic-fetch'; // so I can use fetch() | |
function doSomething() { | |
return dispatch => | |
fetch( | |
'/api/something' | |
).then( | |
response => response.json() | |
).then( |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
Angular.js, JavaScript Framework, на котором теперь ведется вся разработка в компании CloudMill. В этом обзоре будут приведены основные ссылки на изучение, так же он будет постоянно пополняться необходимыми сниппетами и правилами оформления.
Мы работаем с проектом Yeoman, он создает базовую структуру, настраивает тесты и grunt для минификации кода для продакшена, так же дает live-reload и много других полезностей.
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh | |
# |