Skip to content

Instantly share code, notes, and snippets.

View nosalvage's full-sized avatar
🏠
Working from home

Peter Litvinov nosalvage

🏠
Working from home
  • Moscow, Russia
View GitHub Profile
@rozPierog
rozPierog / build.gradle
Last active October 4, 2021 13:14
Automated AAR build, move to folder and deJetify. Just add this to to end of your build.gradle file and run `prepareAAR` task
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 {
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active June 19, 2024 06:18
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

//
// CSPManager.m
// Faktorin
//
// Created by Peter Litvinov on 10/18/18.
// Copyright © 2018 Facebook. All rights reserved.
//
#import "CSPManager.h"
#import <React/RCTLog.h>
@ModPhoenix
ModPhoenix / axios-interceptors-refresh-token.js
Last active June 12, 2024 08:12
Axios interceptors token refresh for few async requests. ES6
import axios from "axios";
import { settings } from "../settings";
import { authAPI } from ".";
const request = axios.create({
baseURL: settings.apiV1,
});
request.interceptors.request.use(
(config) => {
@Atibaashraf
Atibaashraf / Using Redux Thunk middleware, declare some action creators
Last active March 30, 2021 10:00
What's the redux idiom for waiting for multiple async calls?
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(

Folder Structure

Please note

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 Logo

Обзор

Angular.js, JavaScript Framework, на котором теперь ведется вся разработка в компании CloudMill. В этом обзоре будут приведены основные ссылки на изучение, так же он будет постоянно пополняться необходимыми сниппетами и правилами оформления.

Инфраструктура

Мы работаем с проектом Yeoman, он создает базовую структуру, настраивает тесты и grunt для минификации кода для продакшена, так же дает live-reload и много других полезностей.

@mbinna
mbinna / hack.sh
Created April 11, 2012 05:57 — forked from erikh/hack.sh
OSX For Hackers
#!/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
#