Skip to content

Instantly share code, notes, and snippets.

View thomijasir's full-sized avatar
🎯
Focusing

Thomi Jasir thomijasir

🎯
Focusing
View GitHub Profile
@thomijasir
thomijasir / fluttercleanrecursive.sh
Created December 15, 2023 01:06 — forked from jeroen-meijer/fluttercleanrecursive.sh
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
#!/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)"
@thomijasir
thomijasir / locale_codes.coffee
Created December 6, 2023 09:25 — forked from MatthewCallis/locale_codes.coffee
Country / Language / Locale Code List / Hash / Array
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" },
@thomijasir
thomijasir / Special.terminal
Last active May 20, 2020 06:43
My Powerfull Bash Profile MAC
<?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
@thomijasir
thomijasir / terminal-git-branch-name.md
Created February 17, 2019 15:13 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@thomijasir
thomijasir / update_node_npm_osx.md
Created January 14, 2019 04:01
How to upgrade and Update Node.js and NPM Safely

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.

@thomijasir
thomijasir / setup_ubuntu_18_04.sh
Last active February 26, 2019 14:37
Auto Install Application Ubuntu 18.04 Bionic
## 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
@thomijasir
thomijasir / readme.md
Last active May 20, 2019 04:07
Linux commands are often used

List Linux Command Commonly Uses

Remove RPM

Chek RPM Packet name rpm -qa | grep -i webmin

Remove packet name rpm -e

Composer Install

@thomijasir
thomijasir / README.md
Created October 9, 2018 10:40 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@thomijasir
thomijasir / autophponmac.txt
Last active September 27, 2018 04:14
Automatic PHP Upgrade OSX
if you want to upgrade your php in osx just follow this tutorial: https://php-osx.liip.ch/
@thomijasir
thomijasir / splice-object-array.js
Created March 22, 2018 06:59 — forked from scottopolis/splice-object-array.js
Remove object from array of objects in Javascript
// 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);