Skip to content

Instantly share code, notes, and snippets.

View mcmatan's full-sized avatar
🎯
Focusing

Matan Cohen Abravanel mcmatan

🎯
Focusing
  • Melio
  • Tel Aviv
View GitHub Profile
@sooop
sooop / DragTableController.swift
Created February 9, 2017 06:07
NSTableView reordering row with drag and drop
//
// ViewController.swift
// DragTable
//
// Created by Anna Kim on 2017. 2. 9..
// Copyright © 2017년 Anna Kim. All rights reserved.
//
import Cocoa
@takuoka
takuoka / AutoGrowingTextField.swift
Last active January 18, 2022 13:02
Example of an NSTextField that expands its height automatically. https://github.com/DouglasHeriot/AutoGrowingNSTextField
import Cocoa
// https://github.com/DouglasHeriot/AutoGrowingNSTextField
// for AutoLayout
class AutoGrowingTextField: NSTextField {
var minHeight: CGFloat? = 100
@ratazzi
ratazzi / duplicate_xcode_project_target.rb
Last active December 22, 2022 14:09
Duplicate Xcode Project Target with Ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'xcodeproj'
name = 'test_copy'
proj = Xcodeproj::Project.open('test.xcodeproj')
src_target = proj.targets.find { |item| item.to_s == 'test' }
@jk2K
jk2K / extract_realm_database_android.sh
Last active February 22, 2023 15:04 — forked from medyo/extract_realm_database_android.sh
how to export realm database, work on Android 5.0+
#!/bin/bash
ADB_PATH="/Users/lee/Library/Android/sdk/platform-tools"
PACKAGE_NAME="com.yourcompany.app"
DB_NAME="default.realm"
DESTINATION_PATH="/Users/lee/Downloads/${DB_NAME}"
NOT_PRESENT="List of devices attached"
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'`
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then
echo "Make sure a device is connected"
else