Skip to content

Instantly share code, notes, and snippets.

View madlymad's full-sized avatar
👻
Coding stuff

Mando Stamelaki madlymad

👻
Coding stuff
View GitHub Profile
@mosabua
mosabua / AndroidInsecureKeepAliveHttpsTransportSE
Created April 7, 2011 15:51
AndroidInsecureHttpsServiceConnectionSE implements the service connection that will allow any SSL cert on Android 2.1 (api level 7) and below, this disables SSL for old platform version, be careful
import org.ksoap2.transport.HttpsTransportSE;
import org.ksoap2.transport.ServiceConnection;
import java.io.IOException;
public class AndroidInsecureKeepAliveHttpsTransportSE extends HttpsTransportSE {
private AndroidInsecureHttpsServiceConnectionSE conn = null;
private final String host;
private final int port;
@kmansoft
kmansoft / find_missing_translations.py
Created July 3, 2012 09:22
A simple script to find missing translations in an Android project
#!/usr/bin/python
'''
This script finds missing string translations in Android applicaitons.
Author: Kostya Vasilyev. License: Creative Commons Attribution.
The output format is, I believe, more suitable to working with external
translators than the output of Lint from the Android SDK.
@bichotll
bichotll / load_disqus_comments_android.java
Last active April 25, 2019 15:19
Load disqus comments with a htmlview in Android
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_comments);
String htmlComments = getHtmlComment("yourId", "yourShortName");
webDisqus = (WebView) findViewById(R.id.disqus);
// set up disqus
WebSettings webSettings2 = webDisqus.getSettings();
@jpeddicord
jpeddicord / build.gradle
Last active April 14, 2023 20:31
Release APK builder that asks for your key passwords interactively, so you don't have to store them in your build script or VCS. For use with the Gradle build system. CC0 license.
// additional required configuration to hook into the build script
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
@justinamberson
justinamberson / StackOverflowFanatic.py
Created August 13, 2013 01:09
StackOverflow Fanatic Golden Badge Helper Awarded for 100 days of consecutive visits. Defaults to opening the site every 12 hours (43200 seconds)
#StackOverflow Fanatic Badge Helper
#Justin Amberson 2013 : http://justin.amberson.net
#Fanatic Golden badge - 100 consecutive days on StackOverflow
import webbrowser
import time
def openURL(url):
webbrowser.open(url)
@soarez
soarez / ca.md
Last active April 22, 2024 03:01
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@devunwired
devunwired / ExampleFragment.java
Created May 15, 2014 17:03
Method for animating Android fragment positions during a add/replace/remove transition using custom properties. This method does not require subclassing target views with additional setter methods, but instead requires subclassing the fragment...something you are likely already doing.
/**
* An example of adding these transitions to a Fragment. This simple
* version just applies opposite transitions to any Fragment whether it is
* entering or exiting view. You can also inspect the transit mode parameter
* (i.e. TRANSIT_FRAGMENT_OPEN, TRANSIT_FRAGMENT_CLOSE) in combination to do
* different animations for, say, adding a fragment versus popping the back stack.
*
* Transactions without an explicit transit mode set, in this example, will not
* animate. Allowing the initial fragment add, for example, to simply appear.
*/
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@lpf23
lpf23 / CNTLM Proxy - Centos
Last active May 11, 2022 08:29
Configure CNTLM Proxy on Centos/Ubuntu
1) Download cntlm rpm package from http://sourceforge.net/projects/cntlm/files/cntlm/
2) Login as root
3) Run command:
$ rpm -ivh cntlm-*.rpm
4a) Obtain password hash for the configuration file in step 4b (do not put plaintext password in configuration)
$ cntlm -H -d <domain> -u <username>

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs