Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jarretmoses
jarretmoses / logs.js
Created January 6, 2020 15:28
TS/JS Server logs Vscode
[2020-01-06 10:24:07.349] [exthost] [info] extension host started
[2020-01-06 10:24:07.365] [exthost] [info] ExtensionService#_doActivateExtension vscode.typescript-language-features {"startup":false,"extensionId":{"value":"vscode.typescript-language-features","_lower":"vscode.typescript-language-features"},"activationEvent":"onLanguage:typescriptreact"}
[2020-01-06 10:24:07.366] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension
[2020-01-06 10:24:07.390] [exthost] [info] ExtensionService#_doActivateExtension ecmel.vscode-html-css {"startup":false,"extensionId":{"value":"ecmel.vscode-html-css","_lower":"ecmel.vscode-html-css"},"activationEvent":"onLanguage:typescriptreact"}
[2020-01-06 10:24:07.390] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jarretmoses/.vscode/extensions/ecmel.vscode-html-css-0.2.3/dist/extension
[2020-01-06 10:24:07.452] [exthost] [info] Extensi
@jarretmoses
jarretmoses / xcode-print-font-names.m
Created July 14, 2017 14:40
Script to place inside AppDelegate.m to print out actual font names in your iOS (and React Native) project
for (NSString *familyName in [UIFont familyNames]){
NSLog(@"Family name: %@", familyName);
for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) {
NSLog(@"--Font name: %@", fontName);
}
}
2020-05-29T03:26:07.381Z cypress:server:project onMocha hook
2020-05-29T03:26:07.381Z cypress:server:reporter got mocha event 'hook' with args: [ { id: 'r17', title: '"before each" hook', hookName: 'before each', hookId: 'h3', body: 'function () {\n' + ' set_viewport_util_1.setViewport(viewport);\n' + ' }', type: 'hook', duration: 21, file: null } ]
2020-05-29T03:26:07.382Z cypress:server:socket automation:request get:cookies { domain: 'localhost' }
2020-05-29T03:26:07.382Z cypress:server:automation:cookies getting:cookies { domain: 'localhost' }
2020-05-29T03:26:07.382Z cypress:server:socket backend:request { eventName: 'reset:server:state', args: [] }
@jarretmoses
jarretmoses / auth-token-header-set.js
Last active September 3, 2020 11:06
Setting a Global Auth Header to a Auth Token With React + Axios
// api.js
// @flow
import axios from 'axios';
import { BASE_URL } from '../constants/api';
type BaseFetch = {
url: string,
}
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"rc-start": "npm start -- --reset-cache",
"clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean",
"clean-start": "npm run clean && npm run rc-start",
"fresh-install": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build/ModuleCache/* && rm -rf node_modules/ && npm cache clean && npm install",
"fresh-start" : "npm run fresh-install && npm run rc-start",
"tron": "node_modules/.bin/reactotron"
}
@jarretmoses
jarretmoses / React Native Clear Cache
Last active March 11, 2024 10:20
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache