Skip to content

Instantly share code, notes, and snippets.

View giorgiofellipe's full-sized avatar
🎯

Giorgio Fellipe giorgiofellipe

🎯
View GitHub Profile
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active July 25, 2024 03:38
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@szydan
szydan / gist:11225256
Created April 23, 2014 17:31
modify jar war content
jar xf my.war
rm my.war
change something in some file
jar cf ../my.war *
@giorgiofellipe
giorgiofellipe / install_psql_php.sh
Last active October 10, 2021 05:58 — forked from doole/install_psql_php.sh
Install PHP PGSQL extensions on Mac OS X Yosemite (change PHP_VER with your PHP version)
PHP_VER="5.5.14"
# Check if extension exists first
php -m | grep pgsql
# Update brew and install requirements
brew update
brew install autoconf
# Download PHP source and extract
@colllin
colllin / _affixWithinContainer.md
Last active November 29, 2020 17:13
ion-list sticky headers

What this does:

Within an <ion-scroll>, this directive creates sticky item headers that get bumped out of the way by the next item.

Demo: http://cl.ly/2u2X390s0H1a

Requirements:

  • Needs UnderscoreJS for its _.throttle utility.
  • Must be used within an or
@giorgiofellipe
giorgiofellipe / macbook_projector_fix
Last active August 29, 2015 14:21
Macbook does not recognize the projector
Normal way:
- Click on the Apple Menu in the top left corner of your screen
- Select System Preferences from the drop-down menu
- Select the Displays icon
- When the Displays window appears, select the Arrangement tab within the menu bar
- Check the Mirror Displays box in the lower left-hand corner of the window (Note: After checking this box, please wait several seconds. Once the displays are mirrored, you should see the same image on both your projector and computer.)
First, reset what is called the Power Management Unit (PMU) using these steps:
- Shut down the computer.
- Connect it to AC power.
@giorgiofellipe
giorgiofellipe / text_format.js
Last active March 22, 2016 03:15
Text format
var yourString = "The quick brown fox jumps over the lazy dog"; //replace with your string.
var finalString = "";
var maxLength = 16 // maximum number of characters to extract
var count = 0;
var maxTries = ((yourString.length / maxLength) * 2);
while (yourString.length > maxLength) {
count++;
if (count > maxTries) {
break;
@toddmotto
toddmotto / *.md
Last active April 25, 2023 09:06
Component versus Directive in AngularJS

Component versus Directive in AngularJS

.component()

Components are not "helper" methods, they are the best change in Angular 1.x since I've been using it.

What is the role of .component()?

  • Declares new HTML via a template or templateUrl
  • Should be used to create Components as part of a Component architecture
@Bhavdip
Bhavdip / sketch-never-ending.md
Created October 6, 2016 15:53
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@giorgiofellipe
giorgiofellipe / instructions.md
Last active July 31, 2020 08:55
How to deploy MEAN app to AWS EC2
  1. Generate a key pair
  2. Create an AWS EC2 Instance
  3. Edit Security Group network rules
  4. Add Elastic IP and associate it to EC2 Instance
  5. Install Node
  • sudo yum install gcc-c++ openssl-devel make
  • wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
  • close ssh connection or terminal
  • nvm install [version]
  • node --version