Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
#!/bin/sh | |
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script: | |
# sh ./fluttercleanrecursive.sh | |
# or | |
# sudo sh fluttercleanrecursive.sh | |
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)" | |
echo "Looking for projects... (may take a while)" |
getLanguage: (language_code) -> | |
key = language_code.toLowerCase().replace(/-/, '_') | |
isoLangs = [ | |
{ code:"aa", name:"Afar" }, | |
{ code:"ab", name:"Abkhaz" }, | |
{ code:"ae", name:"Avestan" }, | |
{ code:"af", name:"Afrikaans" }, | |
{ code:"ak", name:"Akan" }, | |
{ code:"am", name:"Amharic" }, | |
{ code:"an", name:"Aragonese" }, |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BackgroundColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGKyxYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKcHCBMZHSQoVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T | |
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjIwNjg1NTg5 | |
MzEgMC4yMjkxMjY2MzIyIDAuMjYyOTk2OTcxNiAxTxAnMC4xNTYzODU1ODU3IDAuMTcz |
Here's how I successfully upgraded from v0.8.18
to v0.10.20
without any other requirements like brew etc, (type these commands in terminal):
sudo npm cache clean -f
(force) clear you npm cache
sudo npm install -g n
install "n" (this might take a while)
sudo n stable
upgrade to lastest version
Note that sudo might prompt your password.
## Install Requiriment And update System | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y dist-upgrade | |
sudo apt-get -y install sudo nano git net-tools sudo wget curl bash-completion | |
sudo apt-get -y install software-properties-common dirmngr | |
sudo apt-get -y install apt-transport-https lsb-release ca-certificates | |
sudo apt-get -y install software-properties-common | |
## Update First |
This gist assumes:
www-data
(may be apache
on other systems)if you want to upgrade your php in osx just follow this tutorial: https://php-osx.liip.ch/ |
// source: http://stackoverflow.com/questions/16491758/remove-objects-from-array-by-object-property | |
// we have an array of objects, we want to remove one object using only the id property | |
var apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}]; | |
// get index of object with id:37 | |
var removeIndex = apps.map(function(item) { return item.id; }).indexOf(37); | |
// remove object | |
apps.splice(removeIndex, 1); |