Skip to content

Instantly share code, notes, and snippets.

View Alexisvt's full-sized avatar
🎯
Focusing

Alexis Villegas Torres Alexisvt

🎯
Focusing
  • San Jose, Costa Rica
View GitHub Profile
@Alexisvt
Alexisvt / cascade.js
Created January 9, 2018 12:08 — forked from zbarbuto/cascade.js
Loopback cascade mixin gist
// Cascade delete for loopback
// https://gist.github.com/CjS77/44b2f75c0ec468f590d0
/* jshint node:true */
'use strict';
/**
* There is an incubating feature to cascade the deletes to the relational tables. see
* https://github.com/strongloop/loopback-datasource-juggler/issues/88
*/
@Alexisvt
Alexisvt / git-remove-all-DS_Store
Created February 19, 2018 21:54 — forked from brianmriley/git-remove-all-DS_Store
How Can I Remove .DS_Store Files From A Git Repository? Open terminal and run the following command from your git project root. http://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
@Alexisvt
Alexisvt / .bash_profile
Created February 26, 2018 21:00 — forked from mocon/.bash_profile
Example `.bash_profile` file
# Edit this file
alias aliases="nano ~/.bash_profile" # usage: type `aliases` in Terminal
# Navigate to location
alias home="cd ~"
alias desktop="cd ~/Desktop/"
alias repos="cd ~/Documents/Repos/"
# Navigate to project directory
alias ds="clear && cd ~/Documents/Repos/design-system"
@Alexisvt
Alexisvt / Mac OS X: Open in Visual Studio Code
Created February 27, 2018 02:03 — forked from tonysneed/Mac OS X: Open in Visual Studio Code
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@Alexisvt
Alexisvt / ImagePicker.js
Created April 30, 2018 14:46 — forked from pvanliefland/ImagePicker.js
react-native-image-picker (workarounds)
import {Platform, PermissionsAndroid} from 'react-native';
import RNImagePicker from 'react-native-image-picker';
/**
* Overrides react-native-image-picker
*
* Attempts to fix:
*
* - https://github.com/react-community/react-native-image-picker/issues/385
* - https://github.com/react-community/react-native-image-picker/issues/581
@Alexisvt
Alexisvt / whatsnew.dart
Created July 3, 2018 14:41 — forked from rodydavis/whatsnew.dart
Drop in file for flutter to show a whats new page for the user that is native for android and iOS. (Similar to apples version in keynote, pages, app store and other apps)
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'dart:io';
import 'dart:async';
//Example
class StartPage extends StatelessWidget {
// SHow Native Pop Up to User
static Future<Null> showAlertPopup(
BuildContext context, String title, String detail) async {
@Alexisvt
Alexisvt / nodejs-custom-es6-errors.md
Created July 23, 2018 01:08 — forked from slavafomin/nodejs-custom-es6-errors.md
Custom ES6 errors in Node.js

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors

errors/AppError.js

@Alexisvt
Alexisvt / README.md
Created November 8, 2018 19:34 — forked from elijahmanor/README.md
Has Deprecated Packages

Feel free to run via...

npx https://gist.github.com/elijahmanor/4cc8e3eac9fb5999c5d759388ff27c64

@Alexisvt
Alexisvt / index.js
Created November 8, 2018 19:35 — forked from elijahmanor/index.js
Run JavaScript in the terminal from a gist with npx
#!/usr/bin/env node
console.log( "Look Ma, I'm executing JavaScript from a gist inside the terminal with npx!" );
@Alexisvt
Alexisvt / vanilla-js-cheatsheet.md
Created May 8, 2019 12:05 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet