Skip to content

Instantly share code, notes, and snippets.

View francisrod01's full-sized avatar
🎯
Focusing

Francis (dele/he/him) francisrod01

🎯
Focusing
View GitHub Profile
@francisrod01
francisrod01 / HttpClientFactory.java
Last active May 8, 2020 13:34
[Help] Android - Convert JSON object for ArrayAdapter and ListView object
public class HttpClientFactory {
private HttpClient client;
private HttpPost httpPost;
private HttpGet httpGet;
private String responseBody;
public JSONObject sendGet(String url) {
client = new DefaultHttpClient();
httpGet = new HttpGet(Extras.BASE_URL + Extras.BASE_API + url);
@francisrod01
francisrod01 / access.log
Last active March 26, 2019 13:20
AWS Beanstalk SSL and renewal with Let's Encrypt Free SSL
172.31.43.189 - - [13/Jan/2018:03:01:56 +0000] "GET / HTTP/1.1" 404 139 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "191.37.20.2"
172.31.43.189 - - [13/Jan/2018:03:02:03 +0000] "GET / HTTP/1.1" 404 139 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 OPR/50.0.2762.58" "191.37.20.2"
172.31.20.92 - - [13/Jan/2018:03:07:10 +0000] "GET /.well-known/acme-challenge/<my-key-here> HTTP/1.1" 301 185 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "52.29.173.72"
172.31.20.92 - - [13/Jan/2018:03:07:10 +0000] "GET /.well-known/acme-challenge/<my-key-here> HTTP/1.1" 301 185 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "34.213.106.112"
172.31.43.189 - - [13/Jan/2018:03:07:10 +0000] "GET /.well-known/acme-challenge/<my-key-here> HTTP/1.1" 301 185 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation se
@francisrod01
francisrod01 / gist:ebd620dd2584a15f28cc51e31aa95a67
Created July 2, 2017 14:26 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@francisrod01
francisrod01 / config.js
Last active October 12, 2017 13:47
angularJs - doubt with translate loaderPartial
(function () {
'use strict';
var core = angular.module('app.core');
core.config(translations);
/* @ngInject */
function translations($translateProvider) {
@francisrod01
francisrod01 / app--blocks--router--routerHelperProvider.js
Created June 12, 2017 23:35
ng-demos modular using stateProvider
(function() {
'use strict';
angular
.module('blocks.router')
// .provider('routehelperConfig', routehelperConfig)
// .provider('routehelperConfig', routehelperProvider)
.provider('routerHelper', routerHelperProvider);
// .factory('routehelper', routehelper);
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CloudFormation Sample Template for Node.js application. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters": {
"InstanceType": {
"Description": "EC2 instance type",
"Type": "String",
"Default": "t1.micro",
@francisrod01
francisrod01 / README.md
Created February 11, 2017 20:17 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
Array
(
[0] => Array
(
[Local] => Array
(
[id] => 40
[user_id] => 1
[neighborhood_id] =>
[city_id] => 6015
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
<?php
class Cep {
public function get_cep_cidade($tId, $city)
{
$this->db->select('cep_cidade.nome, cep_estado.id, cep_estado.id_uf');
$this->db->from('cep_cidade');
$this->db->join(
'cep_estado',