Skip to content

Instantly share code, notes, and snippets.

View cyupa's full-sized avatar
🎯
Focusing

Ciprian Redinciuc cyupa

🎯
Focusing
View GitHub Profile
{ sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
@cyupa
cyupa / OCLint setup
Last active August 29, 2015 14:07
XCodebuild OCLint commans
#XCodebuild
xcodebuild -scheme SCHEME_NAME -workspace WORKSPACE_NAME.xcworkspace | tee xcodebuild.log
#Database generator
oclint-xcodebuild xcodebuild.log
#Reporter
oclint-json-compilation-database -e exclude_this_folder* -e Pods* -- -report-type html -o report.html -max-priority-2=15 -max-priority-3=30 -rc CYCLOMATIC_COMPLEXITY=4 -rc LONG_CLASS=200 -rc LONG_LINE=120 -rc LONG_METHOD=60 -rc NPATH_COMPLEXITY=20 -rc NESTED_BLOCK_DEPTH=3 -rc TOO_MANY_PARAMETERS=5 -rc LONG_VARIABLE_NAME=30
@cyupa
cyupa / create_sonar_database.sql
Created October 9, 2014 11:12
Creates a Sonar database
#
# Create Sonar database and user.
#
# Command: mysql -u root -p < create_sonar_database.sql
#
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
@cyupa
cyupa / Adding a new line to the .bash_profile
Created October 9, 2014 12:01
Adding a new line to the .bash_profile
echo 'export PATH=/usr/local/bin:$PATH' >>~/.bash_profile
@cyupa
cyupa / jenkins config
Last active August 29, 2015 14:07
Jenkins build server configuration
# Build Environment
# Importing local variables
PATH=$PATH:/usr/local/bin
source /etc/profile
# Generate the changelog file
mkdir -p ${WORKSPACE}/MobileInitiative2014/iOS/Doozy/Changelog/ | curl -s "http://localhost:8080/job/Hyntly/$BUILD_NUMBER/api/xml?wrapper=changes&xpath=//changeSet//comment" | sed -e "s/<\/comment>//g; s/<comment>//g; s/<\/*changes\/*>//g" | sed '/^$/d;G'> ${WORKSPACE}/MobileInitiative2014/iOS/Doozy/Changelog/changelog.txt
@cyupa
cyupa / sonar-project
Last active August 29, 2015 14:07
Sonar XCode project configuration
##########################
# Required configuration #
##########################
sonar.projectKey=<Your project key>
sonar.projectName=<Your project name>
sonar.projectVersion=<Your project version>
sonar.language=objc
# Project description
@cyupa
cyupa / run-sonar
Created October 13, 2014 08:42
Run sonar on XCode project script
#!/bin/bash
## INSTALLATION: script to copy in your Xcode project in the same directory as the .xcodeproj file
## USAGE: ./run-sonar.sh
## DEBUG: ./run-sonar.sh -v
## WARNING: edit your project parameters in sonar-project.properties rather than modifying this script
#
trap "echo 'Script interrupted by Ctrl+C'; stopProgress; exit 1" SIGHUP SIGINT SIGTERM
function startProgress() {
@cyupa
cyupa / gcovr XCode fix
Created October 15, 2014 08:35
Snippet of code for missing fopen$UNIX2003 and fwrite$UNIX2003
// Add to AppDelegate.h
#ifdef DEBUG
FILE *fopen$UNIX2003(const char *filename, const char *mode);
size_t fwrite$UNIX2003(const void *ptr, size_t size, size_t nitems, FILE *stream);
#endif
// Add to AppDelegate.m
@cyupa
cyupa / Rename.sh
Created July 23, 2015 09:56
Command to rename files contaning -100 to @3x
find . -type f -name "*-100*" -exec sh -c 'mv "$0" "${0/-100/@3x}"' '{}' \;
@cyupa
cyupa / Samsung SmartTV.xml
Created January 22, 2017 16:28
Samsung UE40EH6030 Plex Profile
<?xml version="1.0" encoding="utf-8"?>
<Client name="Samsung SmartTV">
<!-- Author: holzi -->
<!-- http://www.samsungdforum.com/Guide/View/Developer_Documentation/Technical_Notes/Player/Detailed_player_specification -->
<Identification>
<DeviceDescription>
<ModelUrl substring="samsung.com" />
</DeviceDescription>
</Identification>
<TranscodeTargets>