Skip to content

Instantly share code, notes, and snippets.

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

Khem Puthea putheakhem

🏠
Working from home
View GitHub Profile
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
export default class Example extends Component {
render() {
return (
<div className="container">
<div className="row">
<div className="col-md-8 col-md-offset-2">
<div className="panel panel-default">
@putheakhem
putheakhem / PrimeNumber.c
Created November 13, 2017 15:19
A prime number is a positive integer which is divisible only by 1 and itself. For example: 2, 3, 5, 7, 11, 13
#include <stdio.h>
int main()
{
int n, i, flag = 0;
printf("Enter a positive integer: ");
scanf("%d",&n);
for(i=2; i<=n/2; ++i)
{
@putheakhem
putheakhem / html5 introduction
Last active October 22, 2017 09:31
A Simple HTML Document
<!--
Author: Khem Puthea
-->
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
@putheakhem
putheakhem / How to install PHP 7.1 on Mac OS 10.12.4
Created March 31, 2017 12:14
In the gist i will guide you how to install PHP 7.1 over build in PHP 5.6 in Mac Os
Here is a quickly way to install PHP 7.1 on Mac
Make sure you have installed brew
`brew update`
`brew install homebrew/php/php71`
`export PATH="$(brew --prefix( homebrew/php/php71)/bin:$PATH" `
Alternatively you can add `export PATH="$(brew --prefix( homebrew/php/php71)/bin:$PATH" ` in to .bashrc or .zshrc to permenatly change the path to PHP installation
@putheakhem
putheakhem / Decimalconverter.c
Created February 9, 2017 16:02
This Program allow user to convert an integer in decimal value into base 2, 8, 16
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
long decimalToBinary( long integerInDecimal);
long decimalToOctal( long integerInDecimal);
void decimalToHexadecimal( long integerInDecimal);
int main() {
long integerInDecimal;
char option = 'y';