Skip to content

Instantly share code, notes, and snippets.

View trfiladelfo's full-sized avatar

Thiago Filadelfo trfiladelfo

View GitHub Profile
@trfiladelfo
trfiladelfo / base.jade
Last active August 29, 2015 14:19 — forked from kazupon/base.jade
!!! 5
html
head
h1 My Site
block scripts
script(src="/jquery.js")
body
block header
header
p some header content
#include <stdint.h>
#include <stdbool.h>
#define PART_TM4C123GH6PM
#include "inc/tm4c123gh6pm.h"
/*****************************
* LM4F120 - timer based blink
* Using TimerIntRegister
* 80 Mhz clock

GNU GPL Comment Headers Formatted in Various Languages

A convenient reference for adding a GPL license to a work.

All prepared texts are hard wrapped at 80 characters unless stated otherwise.

No Wrap

@trfiladelfo
trfiladelfo / lcd_stellaris_launchpad.c
Last active April 1, 2019 15:23 — forked from vinodstanur/lcd_stellaris_launchpad.c
lcd with stellaris launchpad
/*16x2 lcd with stellaris launchpad...
/----------------------------------------/
CONNECTION TIPS:
RS: PF1
EN:PF2
DATA: PD0 - PD3 to d4 to d7 in lcd respectively
VDD (POWER): connect 5v supply to LCD from the launchpad itself (one of the 3 connection near the switch)
R/W: Ground it
Remaining LCD pins (d0 to d4): Leave it as it is ie floating
VEE of LCD: Pull down using 1K resistor (connect to ground using 1K resistor)
@trfiladelfo
trfiladelfo / HostNameRouter.php
Created January 31, 2016 16:03 — forked from chill117/HostNameRouter.php
Manage multiple hostnames (domains, sub-domains) within a single instance of CodeIgniter.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
Manage multiple hostnames (domains, sub-domains) within a single instance of CodeIgniter.
Example:
If you had the following domain/sub-domain style for your site:
your-domain.com
@trfiladelfo
trfiladelfo / UtilsPackages.java
Created June 5, 2016 20:49 — forked from anonymous/UtilsPackages.java
Pega hash para o cadastro de app no facebook.
package br.com.consultoriadigital.insights.core;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.util.Base64;
import android.util.Log;
import java.security.MessageDigest;
@trfiladelfo
trfiladelfo / KeyboardHandler.m
Created July 18, 2016 14:37 — forked from philipmcdermott/KeyboardHandler.m
Getting the keyboard height on iOS.
- (void)viewDidAppear:(BOOL) animated {
[super viewDidAppear:animated];
// Register notification when the keyboard will be show
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
// Register notification when the keyboard will be hide
[[NSNotificationCenter defaultCenter] addObserver:self
@trfiladelfo
trfiladelfo / UIApplication+AppVersion
Created July 19, 2016 21:01 — forked from ashleymills/UIApplication+AppVersion
UIApplication category to get app version / build
@implementation UIApplication (AppVersion)
+ (NSString *) appVersion
{
return [[NSBundle mainBundle] objectForInfoDictionaryKey: @"CFBundleShortVersionString"];
}
+ (NSString *) build
{
return [[NSBundle mainBundle] objectForInfoDictionaryKey: (NSString *)kCFBundleVersionKey];
@trfiladelfo
trfiladelfo / UIApplication+AppVersion.swift
Created July 19, 2016 21:01 — forked from ashleymills/UIApplication+AppVersion.swift
UIApplication extension to get app version / build
extension UIApplication {
class func appVersion() -> String {
return NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") as! String
}
class func appBuild() -> String {
return NSBundle.mainBundle().objectForInfoDictionaryKey(kCFBundleVersionKey as String) as! String
}