Skip to content

Instantly share code, notes, and snippets.

View palaniraja's full-sized avatar

palaniraja palaniraja

View GitHub Profile
@palaniraja
palaniraja / xcodebuild-help.txt
Created January 19, 2023 21:35
xcodebuild -help - From Xcode 14.2 Build version 14C18
Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings [-json]] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild [-project <projectname>] -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings [-json]] [-showdestinations] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -workspace <workspacename> -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [-showdestinations] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [-json] [<infoitem>] ]
xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]] [-json]
xcodebuild -show
@palaniraja
palaniraja / mindmap.puml
Last active January 13, 2023 19:05
Plantuml mindmap with custom style - leaf nodes without borders
@startmindmap
<style>
node {
LineColor lightgray
}
:depth(2) {
LineColor white
@palaniraja
palaniraja / Package.resolved.json
Last active September 12, 2022 23:14
Swift package manager `Package.resolved` to dependency list csv via `jq`
{
"object": {
"pins": [
{
"package": "AttributedText",
"repositoryURL": "https://github.com/gonzalezreal/AttributedText",
"state": {
"branch": null,
"revision": "c345033e22d5a1cd0e9fe0ec405cc809a8349586",
"version": "0.3.1"
@palaniraja
palaniraja / spm.sh
Created September 8, 2022 23:12
list all swift package manager dependencies used by project for copying without multiple clicks
/usr/libexec/plistbuddy -c "Print :" ~/Desktop/src/bitbucket/myprojectname.xcodeproj/project.pbxproj | grep XCRemoteSwiftPackageReference -A4
@palaniraja
palaniraja / cyclonedx-cocoapods.sh
Last active September 8, 2022 06:13
swift sbom using spdx-sbom-generator and cyclonedx-cocoapods. Wasted almost 2 days to figure out everything
# convert your SPM dependecies to a valid pod file
# something like
# pod "Charts", :git => "https://github.com/danielgindi/Charts", :commit => "66546404a6739173b8e436ab6bc1f2897cd08594"
pod init
pod install
# if you are in monterey, fix ruby first.
@palaniraja
palaniraja / mozilla+tts.sh
Last active July 18, 2022 19:50
steps I had to take in order to get mozilla released model of TTS working with my mac! https://github.com/mozilla/TTS/
pip install https://github.com/reuben/TTS/releases/download/ljspeech-fwd-attn-pwgan/TTS-0.0.1+92aea2a-py3-none-any.whl
python -m pip install --upgrade pip
pip install Cmake
brew install espeak
brew install libsndfile
python -m TTS.server.server
python --version
python -m TTS.server.server
pip uninstall flask
pip install flask==1.1.1
@palaniraja
palaniraja / ObsidianCode.xccolortheme
Last active March 18, 2023 18:08
ObsidianCode.xccolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.940272 0.948094 0.807674 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>JetBrainsMono-Bold - 14.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.940272 0.948094 0.807674 1</string>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@palaniraja
palaniraja / apple-feedback-assitant.js
Created May 18, 2021 18:22
Apple Feedback assistant - printer friendly style
document.querySelector('div[class^="FeedbackResponse"]').style.display='none';
document.querySelector('aside').style.display='none';
document.querySelector('div[class^="Wrapper-sc"]').style.height='auto';
document.querySelector('nav').style.display='none';
document.querySelector('div[class^="Body"]').style.position='inherit';
@palaniraja
palaniraja / minbit.java
Created October 1, 2020 06:16
min. bit flip reqd
class Main
{
public static void main(String args[])
{
int[] prbArray = new int[]{ 0,0,0,1,0,1,0,1,1,1 };
Solution prb = new Solution();
System.out.println(prb.solution(prbArray));
}
}