Skip to content

Instantly share code, notes, and snippets.

🎯
Busy

Nazır Doğan nazrdogan

🎯
Busy
Block or report user

Report or block nazrdogan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nazrdogan
nazrdogan / fix_exfat_drive.md
Created Feb 14, 2019 — forked from scottopell/fix_exfat_drive.md
Fix corrupted exFAT disk macOS/OSX
View fix_exfat_drive.md

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
@nazrdogan
nazrdogan / _verify-repair-permissions-disk.md
Created Nov 24, 2017 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)
View _verify-repair-permissions-disk.md

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@nazrdogan
nazrdogan / Object Flatten
Created Jun 16, 2017 — forked from penguinboy/Object Flatten
Flatten javascript objects into a single-depth object
View Object Flatten
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;
@nazrdogan
nazrdogan / gist:a869fe1b3acf76b2166b7ed17b116601
Created Jul 29, 2016 — forked from Skoua/gist:5927652
Add route to an Apple Map using Google Maps Directions API in Titanium (Alloy).
View gist:a869fe1b3acf76b2166b7ed17b116601
// setup geolocation purpose and accuracy
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;
Ti.Geolocation.purpose = L('geo-purpose');
// setup map and poi's annotation
var latitude = 48.847684,
longitude = 2.35165;
var annotation = Titanium.Map.createAnnotation({
animate: true,
@nazrdogan
nazrdogan / titanium logcat
Last active May 20, 2016 — forked from ricardoalcocer/text
When doing console.log on Android, get the output on the Terminal.
View titanium logcat
The ADB excecutable lives in:
[path-to-android-sdk]/platform-tools/
./adb -e logcat | grep TiAPI
or
./adb -d logcat | grep TiAPI
@nazrdogan
nazrdogan / ALLOY.md
Created Apr 8, 2016 — forked from FokkeZB/ALLOY.md
Alloy constants and helpers for non-Alloy Titanium projects.
View ALLOY.md

If you want to your CommonJS modules to work in both Alloy and plain Titanium projects, you might need a way to detect if you're in Alloy. For instance, if you're in Alloy you would get Underscore from the alloy-module, while in plain Titanium you would require Underscore directly.

Well, you can:

var _ = require((typeof ENV_TEST === 'boolean') ? 'alloy' : 'underscore')._;

The above works by utilizing Alloy's optimization process. In this process, constants like ENV_TEST will be either TRUE or FALSE. The actual expressions in wich they are used will then be evaluated. If FALSE the code block will be removed. In plain Titanium projects the constants are undefined and this typeof ENV_TEST will be undefined, so the code block will be executed.

@nazrdogan
nazrdogan / camera-overlay
Created Apr 1, 2016 — forked from clathrop/camera-overlay
Titanium: Using a camera overlay and saving images to internal storage
View camera-overlay
var win = Titanium.UI.createWindow();
var scanner = Titanium.UI.createView({
width : 260,
height : 200,
borderColor : 'red',
borderWidth : 5,
borderRadius : 15
});
@nazrdogan
nazrdogan / gist.md
Created Mar 2, 2016 — forked from benbalter/gist.md
Example of how to embed a Gist on GitHub Pages using Jekyll.
View gist.md

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

View sticky-table-headerview.js
// just a quick n dirty test. See result: http://monosnap.com/file/wT6dJZ4zOrHzjiXi1mhfnIocEZiAWW
var headerView = Ti.UI.createView({
backgroundColor:'#fff',
height:80,
layout:'horizontal'
});
headerView.add(Ti.UI.createButton({title:'$100',left:20,top:13,height:50,width:80,backgroundColor:'#ca3943',borderRadius:4,color:'#fff'}));
headerView.add(Ti.UI.createButton({title:'$500',left:20,top:13,height:50,width:80,backgroundColor:'#ca3943',borderRadius:4,color:'#fff'}));
@nazrdogan
nazrdogan / README.md
Last active Aug 29, 2015 — forked from FokkeZB/README.md
How to have a dynamic Android menu or action bar for tab groups in Titanium 3.x?
You can’t perform that action at this time.