Skip to content

Instantly share code, notes, and snippets.

View putrasurya's full-sized avatar

Putra Herlambang putrasurya

  • Indonesia
  • 12:06 (UTC +07:00)
View GitHub Profile
@putrasurya
putrasurya / launchsettings.json
Created January 26, 2024 02:18
Blazor Hot Reload
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
// truncated
},
"profiles": {
"http": {
"hotReloadEnabled": true, // add this
// truncated
},
@putrasurya
putrasurya / GenerateTranslation.php
Last active February 1, 2024 15:54
Laravel command script to generate a translation file by leveraging OpenAI capabilities.
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
class GenerateTranslation extends Command
{
protected $signature = 'app:generate-translation';
@putrasurya
putrasurya / 00.howto_install_phantomjs.md
Created August 2, 2016 18:59 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@putrasurya
putrasurya / gist:8e37df9edb764b6274a2
Created November 16, 2015 12:01
cleaning up wordpress shortcode formatting
function your_shortcode ($atts, $content) {
/**
* remove nested p tag that automatically generate by wordpress
*/
return preg_replace("/^<\/p>|<p>$/", "", $content);
}
@putrasurya
putrasurya / Auto Resize Textarea jQuery plugin
Created April 28, 2015 11:17
Auto Resize Textarea jQuery plugin
/**
* Auto Resize Textarea jQuery plugin
*
* Created by putra.surya.h60@gmail.com | Twitter @PutraSoerya9
*
*/
(function($){
var AutoResize = function () {