This file contains hidden or 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
| class MainActivity : ComponentActivity(R.layout.activity_main) { | |
| private var count: Int = 0 | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| textView.text = "$count" | |
| button.setOnClickListener { | |
| count++ | |
| textView.text = "$count" |
This file contains hidden or 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
| (ns katas.diamond) | |
| (require '[clojure.string :as string] | |
| '[clojure.test :refer [is]]) | |
| (defn alphabet-pos [c] | |
| (- (int c) (int \A))) | |
| (defn anagram? [s] | |
| (if (>= 1 (count s)) | |
| true |
This file contains hidden or 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 com.gabrielfv.desafioconcrete.api | |
| import com.gabrielfv.desafioconcrete.api.models.ApiResponse | |
| import com.gabrielfv.desafioconcrete.api.models.Pull | |
| import com.gabrielfv.desafioconcrete.api.models.Repo | |
| import io.reactivex.Observable | |
| import io.reactivex.observers.TestObserver | |
| import org.junit.Before | |
| import org.junit.Test | |
| import org.mockito.Mockito.`when` |
This file contains hidden or 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
| sv_cheats 1 | |
| sv_infinite_ammo 1 | |
| sv_showimpacts 1 | |
| sv_grenade_trajectory 1 | |
| mp_roundtime 60 | |
| mp_roundtime_defuse 60 | |
| mp_roundtime_deployment 60 | |
| mp_roundtime_hostage 60 | |
| mp_round_restart_delay 1 | |
| mp_maxmoney 60000 |
This file contains hidden or 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
| # also set the launcher options to | |
| # -novid -tickrate 128 -fullscreen -w 1280 -h 960 | |
| unbindall | |
| bind "0" "slot10" | |
| bind "1" "slot1" | |
| bind "2" "slot2" | |
| bind "3" "slot3" | |
| bind "4" "slot4" | |
| bind "5" "slot5" | |
| bind "6" "+jump;-attack;-attack2;" |
This file contains hidden or 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
| #!/bin/bash -e | |
| #@author Gabriel Vasconcelos ([email protected]) | |
| #Hints and code taken also from Aleksandar Gotev and http://stackoverflow.com/questions/11929773/compiling-the-latest-openssl-for-android | |
| if [ "$#" -ne 6 ] | |
| then | |
| echo "Usage:" | |
| echo "./openssl-build <ANDROID_NDK_PATH> <OPENSSL_SOURCES_PATH> <ANDROID_TARGET_API> \\" | |
| echo " <ANDROID_TARGET_ABI> <GCC_VERSION> <OUTPUT_PATH>" | |
| echo |
This file contains hidden or 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 com.gabrielfv.android.engine; | |
| import android.app.Service; | |
| import android.content.Intent; | |
| import android.os.Handler; | |
| import android.os.HandlerThread; | |
| import android.os.IBinder; | |
| import android.os.Looper; | |
| import android.os.Message; | |
| import android.os.PowerManager; |
This file contains hidden or 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
| import scrapy | |
| class PageItem(scrapy.Item): | |
| title = scrapy.Field() | |
| class LinkReaderSpider(scrapy.Spider): | |
| name = 'link_follower' | |
| start_urls = ['http://gabrielfv.com'] |
This file contains hidden or 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
| import scrapy | |
| class PageLinkItem(scrapy.Item): | |
| title = scrapy.Field() | |
| links = scrapy.Field() | |
| class LinkReaderSpider(scrapy.Spider): | |
| name = 'link_reader' |
This file contains hidden or 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
| import scrapy | |
| class MinimalSpider(scrapy.Spider): | |
| name = 'minimal' | |
| start_urls = ['http://gabrielfv.com/'] | |
| def parse(self, response): | |
| data = {} | |
| data['title'] = response.css('title::text').extract_first() |