Skip to content

Instantly share code, notes, and snippets.

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

purwandi purwandi

🏠
Working from home
View GitHub Profile
@purwandi
purwandi / sticky.css
Created November 23, 2012 09:17 — forked from mokagio/sticky.css
Twitter Bootstrap + Sticky Footer + Fixed Nav Bar
html, body, .container, .content {
height: 100%;
}
.container, .content {
position: relative;
}
.proper-content {
padding-top: 40px; /* >= navbar height */
@purwandi
purwandi / docker-cleanup.sh
Created April 22, 2016 02:07
Cleanup docker images
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
# find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf ( docker ps -aq | xargs docker inspect | jq -r '.[] | .Mounts | .[] | .Name | select(.)') | xargs -r rm -fr
On Error Resume Next
strComputer = "."
strMainNIC = "Wired"
strMainNICDevice = "Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\Root\CIMV2" )

Aplikasi Entry Nilai

Andri adalah seorang pegawai Tata Usaha sekolah di salah satu Sekolah Menengah Kejuruan (SMK) di daerah BSD Tangerang. Setiap hari dia melakukan input data nilai siswa yang ia peroleh dari masing-masing guru kelas. Begitu data banyak data yang ia input maka ia akhirnya minta bantuan ke salah satu perusahaan swasta untuk membuat aplikasi input data nilai siswa sehingga output yang di hasilkan dapat dikeluarkan secara otomatis. Data yang diinput oleh andri sebagai berikut:

NAMA                    | Nilai Bahasa  | Nilai Matematik   | Nilai  Komputer |
------------------------------------------------------------------------------|
<!-- start: #main -->
<p></p>
<p></p>
<p><!-- start: .main-inner --></p>
<div class="main-inner"><!-- start: .section-header -->
<div class="section-header">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1 class="section-title">F.A.Q</h1>
@purwandi
purwandi / email.html
Created October 10, 2016 02:30
EMail
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css" rel="stylesheet" media="all">
/* Media Queries */
@media only screen and (max-width: 500px) {
@purwandi
purwandi / .ci-installer.sh
Created December 19, 2015 19:05 — forked from kevinvdburgt/.ci-installer.sh
Laravel 5.1 - GitLab CI
#!/bin/bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 0.12
nvm alias default 0.12
npm config set cache-min 86400
npm config set cache /cache/node_modules/
npm install -g gulp
npm install
@purwandi
purwandi / ApiMiddleware.php
Last active May 26, 2016 13:26
Laravel CORS
<?php
namespace App\Http\Middleware;
use Closure;
class ApiMiddleware
{
/**
* Handle an incoming request.
<?php
namespace App;
use Illuminate\Http\Request;
class FooController extends Controller
{
public function index(Request $request)
{
@purwandi
purwandi / README.md
Created May 24, 2016 17:28 — forked from dominikwilkowski/README.md
Ubuntu 16.04 setup with NGINX http/2 and letsencrypt

Intro

This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.

Basics

After creating the server (droplet on DigitalOcean) log in with