Skip to content

Instantly share code, notes, and snippets.

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

Helmut Januschka hjanuschka

🤖
-.-
  • Vienna/Austria
View GitHub Profile
Add View on top
FameLayout rootLayout = (FrameLayout)findViewById(android.R.id.content);
View.inflate(this, R.layout.overlay_layout, rootLayout);
Then when you want to remove it:
FrameLayout rootLayout = (FrameLayout)findViewById(android.R.id.content); rootLayout.removeViewAt(rootLayout.getChildCount()-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) {
@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} }
}
latest_testflight_build_number
increment_build_number({
build_number: lane_context[SharedValues::LATEST_TESTFLIGHT_BUILD_NUMBER]+1
})
#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
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
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!!")
### scp
Allows SCP file transfer.
**Upload file/folder:**
```ruby
scp(
host: "dev.januschka.com",
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
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'