Skip to content

Instantly share code, notes, and snippets.

View andypmw's full-sized avatar
💭
Open to Work!

Andy Primawan andypmw

💭
Open to Work!
View GitHub Profile
@adamstac
adamstac / _font-smoothing.scss
Created February 27, 2013 15:46
WebKit font-smoothing Sass mixin
// WebKit font-smoothing
//------------------------------------------------
// References:
//
// 1. http://maxvoltar.com/sandbox/fontsmoothing/
// 2. http://maxvoltar.com/archive/-webkit-font-smoothing
//
// Values: none, antialiased (default), subpixel-antialiased
//
@wmandai
wmandai / codeigniter-csrf
Created January 4, 2014 12:15
Codeigniter disable CSRF in specific pages
<?php
// Add this to your config.php file
if (stripos($_SERVER["REQUEST_URI"],'/controller/method') === FALSE) {
$config['csrf_protection'] = TRUE;
}else{
$config['csrf_protection'] = FALSE;
}
//the rest of the code
@charltoons
charltoons / autoconfirm.js
Created August 26, 2017 14:21
AWS Cognito Lambda PreSignup Auto-Confirm Trigger
'use strict';
exports.handler = (event, context, callback) => {
console.log('Received event:', JSON.stringify(event, null, 2))
const modifiedEvent = event
// check that we're acting on the right trigger
if (event.triggerSource === "PreSignUp_SignUp"){
// auto confirm the user