Skip to content

Instantly share code, notes, and snippets.

View cengkuru's full-sized avatar

cengkuru michael cengkuru

View GitHub Profile
@cengkuru
cengkuru / Response.php
Created June 28, 2021 06:02 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
S3 PutObject Role
---
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "s3:PutObject",
"Resource": "*"
@cengkuru
cengkuru / LICENCE SUBLIME TEXT
Created February 13, 2019 11:04
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@cengkuru
cengkuru / gist:3903006fca99753d721e21589ed59e78
Created July 30, 2018 09:12 — forked from voskobovich/gist:537b2000108e4781f70b
List of most currency ISO code and symbol format in SQL.
DROP TABLE currency;
-- Create table variable
CREATE TABLE currency (
name VARCHAR(100),
code VARCHAR(100),
symbol VARCHAR(100)
);
-- Insert currency records
@cengkuru
cengkuru / api.py
Created July 28, 2018 02:01 — forked from salmanwahed/api.py
REST Api with Flask-Restful and MongoDB
# -*- coding: utf-8 -*-
from flask import Flask, jsonify, url_for, redirect, request
from flask_pymongo import PyMongo
from flask_restful import Api, Resource
app = Flask(__name__)
app.config["MONGO_DBNAME"] = "students_db"
mongo = PyMongo(app, config_prefix='MONGO')
APP_URL = "http://127.0.0.1:5000"
@cengkuru
cengkuru / app.module.ts
Created July 5, 2017 08:12 — forked from klihelp/app.module.ts
Angular 2 - Add safeHtml for innerHTML
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SafeHtmlPipe } from "./pipes"
@NgModule({
declarations: [
SafeHtmlPipe,
@cengkuru
cengkuru / CSS3 Media Queries Template
Created March 18, 2017 08:11
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@cengkuru
cengkuru / gulpfile.js
Created October 18, 2016 16:25 — forked from torgeir/gulpfile.js
Example gulpfile.js
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
@cengkuru
cengkuru / material-design-breakpoints.css
Created October 15, 2016 21:19 — forked from eyecatchup/material-design-breakpoints.css
CSS media queries based on the breakpoint guidance published by the Material Design team. http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoint
/* Material Design Adaptive Breakpoints */
/*
Below you'll find CSS media queries based on the breakpoint guidance
published by the Material Design team. You can choose to use, customise
or remove these breakpoints based on your needs.
http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints
*/
/* mobile-small */
@cengkuru
cengkuru / Git push deployment in 7 easy steps.md
Created June 30, 2016 05:24 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook