Skip to content

Instantly share code, notes, and snippets.

View artdvp's full-sized avatar

Art dvp artdvp

  • Thailand
View GitHub Profile
@artdvp
artdvp / ask_qna.md
Last active December 22, 2019 08:20
How To Ask Questions

How To Ask Questions

Asking questions is a very important skill for a developer. However, in your career you won't always have someone to give you all of the answers. Part of being a developer is getting really good at something we call problem solving. It is often the most overlooked skill to practice by a beginner. In this course, we want to work on the skills that matter, so moving forward, I have a request for you that will have long term positive effects on your career:

If you have a question or you don't understand something, do these things in order:

  1. Try Rubber Ducking: https://rubberduckdebugging.com/ (all great programmers I know do this)
  2. Use google and websites like stackoverflow (there is a video coming up on this) to find your answer. Most likely somebody has had your issue before.
  3. Reach out to our community on Discord (Invite link in lecture 2) where we have lots of smart developers who are there to help you. Learn to communicate and ask questions with
@artdvp
artdvp / lab_number.c
Last active January 8, 2019 16:57
lab by Art
#include <stdio.h>
int main()
// ข้อ 3.5
{
float x,y;
printf("Enter a real number x y : ");
scanf("%f%f", &x,&y);
@artdvp
artdvp / json.js
Last active June 6, 2018 17:26
node-workshop 03
// JSON.stringify, JSON.parse
/*
JSON (JavaScript Object Notation) คือ รูปแบบของข้อมูลที่ใช้สำหรับแลกเปลี่ยนข้อมูลที่มีขนาดเล็ก
ซึ่งคนสามารถทำความเข้าใจได้ง่าย และสามารถถูกสร้างและอ่านโดยเครื่องได้ง่าย
*/
// JSON.stringify() ใช้แปลงข้อมูล ให้กลายเป็นแถว string
let stri = JSON.stringify(student)
console.log(JSON.stringify(student))
@artdvp
artdvp / array.js
Created June 6, 2018 17:14
node-workshop 02
// Array Method
var data = ['A', 'B', 'C', 'D']
// push
// เพิ่มสมาชิกต่อท้าย array
data.push('E')
console.log(data)
// ['A', 'B', 'C', 'D', 'E']
// pop
// ลบสมาชิกตัวสุดท้ายออก
@artdvp
artdvp / data_type.js
Last active June 6, 2018 17:13
node-workshop 01
console.log('Hello World')
// ชนิดข้อมูล (Data Type)
// Number, String, Boolean
var id = 3 // Number
var name = 'Artdvp' // String
var ok = true // Boolean
var name2 = `Artdvp id = ${id}` // การทำ String ให้สามารถใส่ตัวแปรหรือ expression (Template literals) ครอบด้วย `...`
@artdvp
artdvp / cve-2015-0240_samba_exploit.py
Created March 5, 2018 16:25 — forked from worawit/cve-2015-0240_samba_exploit.py
Exploit for Samba vulnerabilty (CVE-2015-0240)
#!/usr/bin/python
"""
Exploit for Samba vulnerabilty (CVE-2015-0240) by sleepya
The exploit only targets vulnerable x86 smbd <3.6.24 which 'creds' is controlled by
ReferentID field of PrimaryName (ServerName). That means '_talloc_zero()'
in libtalloc does not write a value on 'creds' address.
Reference:
- https://securityblog.redhat.com/2015/02/23/samba-vulnerability-cve-2015-0240/
@artdvp
artdvp / README.md
Last active December 24, 2017 10:16
Responsive Web Design

Codecademy : Responsive Web Design

SIZING ELEMENTS

Em

Incorporating relative sizing starts by using units other than pixels. One unit of measurement you can use in CSS to create relatively-sized content is the em, written as em in CSS.

Historically, the em represented the width of a capital letter M in the typeface and size being used. That is no longer the case.