Skip to content

Instantly share code, notes, and snippets.

View aikchun's full-sized avatar
🎯
Focusing

Aik Chun aikchun

🎯
Focusing
View GitHub Profile
@aikchun
aikchun / settings.json
Last active May 27, 2023 06:54 — forked from chidea/settings.json
Seoul256 color scheme for Windows Terminal
{
"schemes" :
[
{
"name" : "Seoul256",
"background" : "#545454",
"foreground" : "#d0d0d0",
"cursorColor" : "#d0d0d0",
"brightBlack" : "#626262",
"brightRed" : "#d68787",
@aikchun
aikchun / go-ci.yml
Created May 21, 2023 09:15
Github actions Templte CI for go
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
@aikchun
aikchun / restful_routes.md
Created August 10, 2018 07:07 — forked from alexpchin/restful_routes.md
7 Restful Routes
URL HTTP Verb Action
/photos/ GET index
/photos/new GET new
/photos POST create
/photos/:id GET show
/photos/:id/edit GET edit
/photos/:id PATCH/PUT update
/photos/:id DELETE destroy
@aikchun
aikchun / gist:cdf494641c1893330f29e40f12a4bb19
Created June 20, 2017 15:44 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@aikchun
aikchun / aliases
Created July 24, 2016 02:03
aliases I generally use
# general shortcuts
alias home="cd ~"
alias ls="ls -lG "
alias lsla="ls -laG "
# Git Shortcuts
alias gs="git status"
alias ga="git add"
alias gaa="git add ."
@aikchun
aikchun / .env.travis
Created July 20, 2016 23:18 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@aikchun
aikchun / gist:9636588
Last active August 29, 2015 13:57
how to access variabel passed in through redirect
public function view() {
if($this->request->is('post')) {
$data = $this->request->data['HashAlgorithm'];
$this->log($data);
$this->redirect(array('controller' => 'HashResults' ,'action' => 'inputPlaintext', $data));
}
$conditions = array(
'fields' => array('name'),
'order' => array('name ASC')
@aikchun
aikchun / readTextFile
Created January 30, 2014 12:15
Read text file java
public static String readTextFile () {
String fileContent = "";
BufferedReader br = null; ;
try {
br = new BufferedReader (new FileReader("TextFile.txt"));
StringBuilder sb = new StringBuilder();
String fileLine = "";
while ((fileLine = br.readLine()) != null) {
System.out.println(fileLine);
sb.append(fileLine);
@aikchun
aikchun / imap-gmail
Last active June 12, 2024 11:41
IMAP PHP gmail attachment extractor
<?php
/**
*
* Gmail attachment extractor.
*
* Downloads attachments from Gmail and saves it to a file.
* Uses PHP IMAP extension, so make sure it is enabled in your php.ini,
* extension=php_imap.dll
#!/bin/bash
###
#
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea
# Copyright (c) 2011 Cake Development Corporation (http//cakedc.com)
#
# Ubuntu 12.10 based web server installation script
# Run this by executing the following from a fresh install of Ubuntu 12.10 server:
#