Skip to content

Instantly share code, notes, and snippets.

View mbektchiev's full-sized avatar

Martin Bektchiev mbektchiev

  • Telerik
  • Sofia, Bulgaria
View GitHub Profile

IOS RUNTIME Tweaks

CMake dump all defined vars:

get_cmake_property(_variableNames VARIABLES) list (SORT _variableNames) foreach (_variableName ${_variableNames})     message(STATUS "${_variableName}=${${_variableName}}") endforeach()

Useful JSC Environment options

defaults write com.apple.dt.Xcode ExplainWhyBuildCommandsAreRun -bool true
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks `sysctl -n hw.ncpu`
@mbektchiev
mbektchiev / .editorconfig
Created January 23, 2015 09:11
.editorconfig for AppBuilder coding style
# top-most EditorConfig file
root = true
[*]
end_of_line = crlf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
@mbektchiev
mbektchiev / GitHubApiCommands
Last active March 19, 2019 19:45
Recover forced/deleted branches
// events per repo:
curl https://api.github.com/repos/Icenium/Ice/events?page=1 -u mbektchiev
// events per user:
curl https://api.github.com/users/mbektchiev/events?page=1 -u mbektchiev
// Create a new branch pointing at specified commit SHA:
curl -i -X POST https://api.github.com/repos/Icenium/Ice/git/refs -u mbektchiev -H "Content-Type: application/json" -d '{"ref":"refs/heads/bektchiev/recover2", "sha":"08b58ffdfc4fa57afad636dadc44692fe26fdc76"}'
@mbektchiev
mbektchiev / get-github-events.js
Last active August 29, 2015 14:08
Recover lost (force-pushed) commit from GitHub
#!/usr/bin/env node
var debug = false;
var authorizationString = null;
// uncomment and fill-in when authorization is needed
//authorizationString = 'Basic <base64encoded username:password>';
var querystring = require('querystring');
var https = require('https');
@mbektchiev
mbektchiev / gitconfig
Last active February 7, 2020 09:11
My global gitconfig
[advice]
detachedHead = false
[user]
email = [email protected]
name = Martin Bektchiev
[push]
default = current
#!/bin/bash
IFS=$'\n'
for j in {1..20}; do
echo Iteration number: $j/20
for i in `find -iname \*.cpp -o -iname \*.h -o -iname \*.cs` ; do
# for i in `cat filelist.txt` ; do
sed "s/^\(\t*\) /\1\t/g" -i $i ;
done;
done