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 mipackage; | |
import java.util.Timer; | |
import java.util.TimerTask; | |
import android.content.Context; | |
import android.location.Location; | |
import android.location.LocationListener; | |
import android.location.LocationManager; | |
import android.os.Bundle; |
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
// cdigo para aceptar los certificados ssl | |
public class MySSLSocketFactory extends SSLSocketFactory { | |
SSLContext sslContext = SSLContext.getInstance("TLS"); | |
public MySSLSocketFactory(KeyStore truststore) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { | |
super(truststore); | |
TrustManager tm = new X509TrustManager() { | |
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { |
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
<%= raw @content %> |
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
require 'open-uri' | |
class DerpController < ApplicationController | |
layout nil | |
def blog | |
source = "http://www.perry.es/feed/" # url (or local file) with the feed we want to show | |
tmp = "" # load here rss data | |
open(source) do |s| tmp = s.read end | |
@content = tmp |
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
JQFEED = { | |
numNews: 5, | |
appendTo: '#blogfeed', | |
realUrl: 'http://www.perry.es', | |
internalUrl: '/blog_feed', | |
loadFeeds: function() { | |
$(JQFEED.appendTo).html('Loading feed...'); | |
$.ajax({ | |
url: JQFEED.internalUrl, | |
type: 'GET', |
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
GIT_BRANCH = `git status | sed -n 1p`.split(" ").last | |
GIT_COMMIT = `git log | sed -n 1p`.split(" ").last | |
GIT_REVISION = `git log --pretty=format:'%h' -n 1` | |
GIT_LASTUPDATE = `git log -1 | sed -n 3p`.split(" ").slice(1,5).join(" ") |
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
<ImageView android:id="@+id/theImage | |
android:layout_width="100dp" | |
android:layout_height="100dp" | |
android:padding="5dp" | |
android:scaleType="centerCrop" | |
android:cropToPadding="true" /> |
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
try { | |
Field field = ImageView.class.getDeclaredField("mCropToPadding"); | |
field.setAccessible(true); | |
field.set(imageView, true); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} |
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
# ActionMailer data | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { | |
:address => "smtp.gmail.com", | |
:port => 587, | |
:domain => "mydomain.com", | |
:user_name => "my.sender.address@gmail.com", | |
:password => "my_google_autogenerated_password", | |
:authentication => "plain", | |
:enable_starttls_auto => true |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.7653 0.699234 0.758969 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Inconsolata - 13.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.6431 0.5881 0.637824 1</string> |
OlderNewer