Skip to content

Instantly share code, notes, and snippets.

View hjanuschka's full-sized avatar
🤖
-.-

Helmut Januschka hjanuschka

🤖
-.-
  • Vienna/Austria
View GitHub Profile
@hjanuschka
hjanuschka / update_spark.sh
Created April 25, 2016 14:41
Fix UUID inside Spark inspector
#!/bin/bash
#get current xcode uuid
UUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID)
#update spark inspector uuid
defaults write ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin/Contents/Info.plist DVTPlugInCompatibilityUUIDs -array-add $UUID
fastlane testflight
[12:38:45]: -----------------------------
[12:38:45]: --- Step: import_from_git ---
[12:38:45]: -----------------------------
[12:38:45]: Cloning remote git repo...
[12:38:45]: $ git clone '[email protected]:mobile/fastlane.git' '/var/folders/2h/vvk1jc1n171bxtbqqn45ddsh0000gp/T/fl_clone20160418-9122-iy20tk/fastlane.git' --depth 1 -n
/Users/ios/.rvm/gems/ruby-2.1.8/gems/fastlane-1.81.0/lib/fastlane/helper/sh_helper.rb:26: warning: Insecure world writable dir /opt in PATH, mode 040777
[12:38:45]: ▸ Cloning into '/var/folders/2h/vvk1jc1n171bxtbqqn45ddsh0000gp/T/fl_clone20160418-9122-iy20tk/fastlane.git'...
[12:38:45]: $ cd '/var/folders/2h/vvk1jc1n171bxtbqqn45ddsh0000gp/T/fl_clone20160418-9122-iy20tk/fastlane.git' && git checkout HEAD 'fastlane/Fastfile'
[12:38:45]: $ cd '/var/folders/2h/vvk1jc1n171bxtbqqn45ddsh0000gp/T/fl_clone20160418-9122-iy20tk/fastlane.git' && git checkout HEAD 'fastlane/actions'
mlab offers different server configurations and I believe they should have sharing in place. But you should ask them directly. However regarding your first question, managed hosting such as mlab, are always easier to handle than setting up your own cluster. One provide ease of use, while other flexibility. Again it depends on your database size and other factors dictating which path to go. So it's you need to dec
### scp
Allows SCP file transfer.
**Upload file/folder:**
```ruby
scp(
host: "dev.januschka.com",
lane :bump_version do
require 'spaceship'
ensure_git_status_clean
Spaceship::Tunes.login
app = Spaceship::Tunes::Application.find($self_idfs[0])
version = prompt(text: "New Version number?")
app.create_version!(version)
increment_version_number(version_number: version)
commit_version_bump(message: "Version Bump!!")
lane :submit_build do |options|
require 'spaceship'
Spaceship::Tunes.login
app = Spaceship::Tunes::Application.find($self_idfs[0])
version = app.edit_version
#get latest build
#select top build fur current version
app = Spaceship::Tunes::Application.find("app.id.f")
version = app.edit_version
#get latest build
use_build = version.candidate_builds.first
# OR With this one set a specific
latest_testflight_build_number
increment_build_number({
build_number: lane_context[SharedValues::LATEST_TESTFLIGHT_BUILD_NUMBER]+1
})
@hjanuschka
hjanuschka / mongo
Last active October 12, 2015 14:17
db.uploads.aggregate([
{
$group: { _id: { userId: '$userId' }, formFields: { $addToSet: '$formFields'} }
},
{
$unwind:"$formFields"
},
{
$group: { _id: "$_id", formFieldsCount: { $sum:1} }
}
#include <stdio.h>
#define MY_TRUE 0
#define MY_FALSE -1
#define MAX_NUM 20
int num_is_dividable(int num);
int main(int argc, char ** argv) {