Skip to content

Instantly share code, notes, and snippets.

View cmfsotelo's full-sized avatar

Carlos Sotelo cmfsotelo

View GitHub Profile
@cmfsotelo
cmfsotelo / GitHub curl.sh
Created May 14, 2020 21:58 — forked from Integralist/GitHub curl.sh
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@cmfsotelo
cmfsotelo / createuser.sh
Last active March 6, 2020 17:56 — forked from jhbush/createadminuser.sh
Create User Script
#!/bin/bash
# This script creates a user account under Mac OS X
usage() {
echo " Synopsis"
echo ' create-user userName userFullName userPassword groupId'
echo ""
echo ""
echo " Description"
echo " Creates a new user with the given params and attributes to the desired group"
}
@cmfsotelo
cmfsotelo / global-gitignore.md
Last active December 2, 2019 09:51 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@cmfsotelo
cmfsotelo / gradleDependencies.md
Created May 6, 2019 08:20 — forked from dmytrodanylyk/description.md
Where this dependency comes from?

Did you ever have android build failed​ issue because of dependency resolution?

… or you were curious where all these old rxjava dependencies come from?

You can pretty easy track the module causing issues via following gradle command.

gradlew :root-module:dependencyInsight \
--configuration debugRuntimeClasspath \ // or debugCompileClasspath
--dependency io.reactivex:rxjava:1.1.0 > dependencies.txt // saves result to 'dependencies.txt' file
@cmfsotelo
cmfsotelo / VSCode debug install cordova plugin
Created March 7, 2019 17:22 — forked from Chuckytuh/VSCode debug install cordova plugin
This launch.json configuration is helpful for cordova hook development. It allows to launch cordova cli with VSCode debugger attached so we can place breakpoints on our hook scripts.
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",