Skip to content

Instantly share code, notes, and snippets.

View dfeverx's full-sized avatar
🏠
Working from home

dfeverx dfeverx

🏠
Working from home
View GitHub Profile
@dfeverx
dfeverx / index.ts
Last active September 30, 2020 04:04
A basic tsconfig file
class Vehicle implements IVechicle {
mKey: string
constructor(key: string) {
this.mKey = key
}
start(): boolean {
if (this.mKey) {
console.log("Vehicle started");
return true
} else {
/**
* Created by android tech point on 9/22/2017.
*/
fun Toast.createToast(context: Context, message:String, gravity:Int, duration:Int){
val inflater:LayoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
/*first parameter is the layout you made
second parameter is the root view in that xml
*/
val layout = inflater.inflate(R.layout.custom_toast_layout, (context as Activity).findViewById<ViewGroup>(R.id.custom_toast_container))
@dfeverx
dfeverx / custom-domain-localhost-xampp
Created February 5, 2019 16:14 — forked from oozman/custom-domain-localhost-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onwards are pretty much applicable on other operating system.
Step 1:
Go to: C:\Windows\System32\Drivers\etc\hosts
And add this to the bottom of the file:
=============
127.0.0.1 your.domain.com
=============
Step 2:
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf
@dfeverx
dfeverx / test.java
Last active January 9, 2019 04:57
test.java
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
fun main() {
var hai ="hello world"
println({hai})
}