This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SignUpActivity extends Activity { | |
private final ObjectGraph childOg; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState): | |
ExampleApp app = (ExampleApp) getApplication(); | |
ObjectGraph og = app.getObjectGraph(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.andraskindler.playground.adapter; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.TextView; | |
import com.andraskindler.playground.Item; | |
import com.andraskindler.playground.R; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############# | |
# This is my fork of consti/post-commit gist: https://gist.github.com/consti/3082406 | |
# It uses a more human date naming and stores captures from same repo to same directory. | |
# I have also added branch name at filename. | |
############# | |
# | |
# Take a photo of you, whenever you make a commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import argparse | |
def main(): | |
argparser = argparse.ArgumentParser(description='Testing ARN stuff') | |
argparser.add_argument("--role", help="If running with a role provide it here", required=True) | |
argparser.add_argument("--profile", help="Credential profile", required=True) | |
argparser.add_argument('--region', help='AWS Region to work within, defaults to eu-central-1', default='eu-central-1', required=False) | |
args = argparser.parse_args() | |
role = args.role |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Larry Smith Jr. | |
# mrlesmithjr@gmail.com | |
# @mrlesmithjr | |
# http://everythingshouldbevirtual.com | |
# | |
# Variables | |
DD_BS="512 1024 2048 4096 8192 16384 1048576" #define blocksizes to test in Bytes [512=512b, 1024=1k, 2048=2k, 1048576=1MB] | |
DD_CONV_OPTIONS="fdatasync,notrunc" #define the output options to pass to dd when creating TESTFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Android 4.3+ changes app's internal directory permissions and you can not just pull your | |
# databases to your computer, so I did this as a workaround to extract my databases. | |
# I only use it for debug, use it under your responsability. | |
package=$1 | |
db_name=$2 | |
path="/data/data/$package/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.Jenkins | |
build = Jenkins.instance.items[0].builds[0] | |
println build | |
println("Available actions on the build: " + build.actions) | |
def analysisCoreActions = [] | |
// All static analysis actions based on static analysis core can be handled uniformly | |
analysisCoreActions.addAll(build.actions.findAll{it.class.name =~ "hudson.plugins.checkstyle.CheckStyle.*ResultAction"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This would go into .bash_profile, .bashrc, .zshrc, etc. | |
# Script to start the gpg-agent - in it's own file as it is also used when the machine starts up | |
# Be sure to update the path to wherever you place this file! | |
# Note, depending on shell you may not need this line enabling, if the global daemon is already running | |
# OK. Some shells complain, others don't! | |
~/bin/startup-gpg-agent.sh | |
# GPG | |
if [ -f "${HOME}/.gpg-agent-info" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import boto | |
from django.db import models | |
from django.conf import settings | |
from django.contrib.auth.models import User | |
class UploadToken(models.Model): | |
user = models.ForeignKey(User) | |
created = models.DateTimeField(auto_now_add=True) |
OlderNewer