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 / 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 / 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 / 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);