Skip to content

Instantly share code, notes, and snippets.

View adriangl's full-sized avatar
💻
Back to work!

Adrián García adriangl

💻
Back to work!
View GitHub Profile
@amitpdev
amitpdev / adjust_gpx_to_apple_format.awk
Created September 16, 2015 17:17
Use this awk script to adjust standard GPX files downloaded from any site (bikes) into a GPX format that is supported by Xcode.
awk '
BEGIN {
buffer=""
}
{
gsub(/<\/*trk>/,"",$0)
gsub(/<\/*trkseg>/,"",$0)
gsub(/<trkpt/,"<wpt", $0)
gsub(/<\/trkpt>/,"<\/wpt>", $0)
print
@pabloogc
pabloogc / Logcatpls
Last active January 6, 2019 06:38
Regex for Android Studio filter
^((?!ResourcesManager|InputEventReceiver|PopupWindow|MaliEGL|PhoneWindow|GraphicBuffer|.MALI..Gralloc.|InputMethodManager|libc-netbsd|NativeCrypto|OpenSSLLib|VelocityTracker|Posix|View|System.out|ADB_SERVICES|BatteryMeterView|BufferQueue|dalvikvm|ActivityThread|PowerManagerService|SurfaceFlinger|OpenGLRenderer|ANRManager|InputReader|PhoneInterfaceManagerEx|PowerManagerNotifier|KeyguardUpdateMonitor|WifiStateMachine|PowerManagerDisplayController|WifiHW|AppOps|StatusBar\.NetworkController|dingtao_Resolver|Provider.Settings|System.out|SignalClusterView|wpa_supplicant|SurfaceFlinger|Tethering|SIMHelper|wifi).)*$
@georgy7
georgy7 / extract_mbox_attachments.py
Last active May 25, 2024 09:19
Extract attachments from mbox file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Modified.
# Original script source:
# http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# https://web.archive.org/web/20150312172727/http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# Usage:
# Run the script from a folder with file "all.mbox"
@mandiwise
mandiwise / Count lines in Git repo
Last active May 16, 2024 13:28
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 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
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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