Skip to content

Instantly share code, notes, and snippets.

View gianpaj's full-sized avatar
🇺🇦

Gianfranco P gianpaj

🇺🇦
View GitHub Profile
@gianpaj
gianpaj / Chrome_OSX_mem_util.sh
Created May 16, 2014 00:34
How much RAM are all your Google Chrome tabs using? (Real Memory Size aka Resident mem)
ps aux |grep "Google Chrome"| grep -v grep| awk '{print $6}' | awk '{ sum+=$1} END {print sum/1024 "MB"}'
For example 75 tabs + 17 extensions + 3 plugins + 1 web worker=
8025.2MB
@gianpaj
gianpaj / 0_reuse_code.js
Created June 2, 2014 10:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gianpaj
gianpaj / javascript_resources.md
Created June 2, 2014 11:00 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
Fri Oct 10 17:22:07.024 [initandlisten] MongoDB starting : pid=93153 port=27017 dbpath=/data/db/ 64-bit host=Gianfranco-10gen.local
Fri Oct 10 17:22:07.025 [initandlisten]
Fri Oct 10 17:22:07.025 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Fri Oct 10 17:22:07.025 [initandlisten] db version v2.4.11
Fri Oct 10 17:22:07.025 [initandlisten] git version: fa13d1ee8da0f112f588570b4070f73d7af2f7fd
Fri Oct 10 17:22:07.025 [initandlisten] build info: Darwin bs-osx-106-x86-64-2.10gen.cc 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
Fri Oct 10 17:22:07.025 [initandlisten] allocator: system
Fri Oct 10 17:22:07.025 [initandlisten] options: { logpath: "Desktop/test-mlogfilter-issue-50.log" }
Fri Oct 10 17:22:07.027 [initandlisten] journal dir=/data/db/journal
Fri Oct 10 17:22:07.027 [initandlisten] recover : no journal files present, no recovery needed
@gianpaj
gianpaj / keybase.md
Created March 18, 2016 15:34
keybase.md

Keybase proof

I hereby claim:

  • I am gianpaj on github.
  • I am gianpaj (https://keybase.io/gianpaj) on keybase.
  • I have a public key ASBxPEKRsg05dGhwvqTJX6_58PcvbVteLKxzBcBGoHHe5Ao

To claim this, I am signing this object:

Verifying that +gianpaj is my blockchain ID. https://onename.com/gianpaj
@gianpaj
gianpaj / iterm-automation.sh
Created May 14, 2014 23:30
Automate opening of new tabs in iTerm/Terminal and start command or daemon
#!/bin/bash
echo
echo "Opening project services in a new iTerm window"
osascript <<EOD
launch "iTerm"
tell application "iTerm"
activate
set myterm to (make new terminal)
@gianpaj
gianpaj / package-json-ionic-app-scripts-issue.diff
Created October 2, 2017 22:45
issue #1252 ionic-team/ionic-app-scripts
diff -r /private/var/folders/nc/scs6t9xj61l7rtzhz8cl48480000gn/T/aj3Wga_package-lock.json ./package-lock.json
62c62
< "tsickle": "0.21.6"
---
> "tsickle": "https://registry.npmjs.org/tsickle/-/tsickle-0.21.6.tgz"
105,112d104
< }
< },
< "@angular/tsc-wrapped": {
< "version": "4.4.3",
Verifying my Blockstack ID is secured with the address 1JKi921Q7E6o3BqUgVbogjt6QEdLxadWqF https://explorer.blockstack.org/address/1JKi921Q7E6o3BqUgVbogjt6QEdLxadWqF
@gianpaj
gianpaj / anim-button-from-input-fields.js
Last active February 24, 2018 12:33
animate button backgroundColor based input field's values - React Native
import React from 'react';
import { Animated, View } from 'react-native';
import { FormInput } from 'react-native-elements';
import AnimButton from 'react-native-micro-animated-button';
export class LoginScreen extends React.Component {
PwdInput;
loginBtn;
animatedValue = new Animated.Value(0);