Skip to content

Instantly share code, notes, and snippets.

View sooluh's full-sized avatar
🇵🇸
stand with palestine!

Torch sooluh

🇵🇸
stand with palestine!
View GitHub Profile
@sooluh
sooluh / README.md
Created February 1, 2024 09:02
Fix NativePHP in Windows
@sooluh
sooluh / .curlrc
Created December 30, 2022 07:12
Add newline at end of curl response body
-w "\n"
@sooluh
sooluh / ExampleController.ts
Last active December 30, 2022 07:13
Server-side datatable with AdonisJS
import Users from 'App/Models/Users'
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
export default class ExampleController {
public async datatable({ request }: HttpContextContract) {
const users = Users.query()
const query = request.qs()
if (typeof query.draw === 'undefined') {
return {
@sooluh
sooluh / http-header.php
Last active June 20, 2023 03:26
Securing HTTP headers in the PHP language.
<?php
/**
* Securing HTTP headers in the PHP language.
* Written by Suluh Sulistiawan <suluh.webdevelopers@hotmail.com>
* Use as you like, hopefully useful.
*/
/**
* X-Frame-Options allows content publishers
@sooluh
sooluh / google-login.ts
Last active June 20, 2023 03:25 — forked from Brandawg93/google_login.ts
Login to Google Account via Puppeteer
import puppeteer from 'puppeteer-extra';
import pluginStealth from 'puppeteer-extra-plugin-stealth'; // Use v2.4.5 instead of latest
import * as readline from 'readline';
puppeteer.use(pluginStealth());
// Use '-h' arg for headful login.
const headless = !process.argv.includes('-h');
// Prompt user for email and password.
@sooluh
sooluh / reoder-ai.sql
Last active December 30, 2022 07:17 — forked from carloscarcamo/reorderAutoIncrementIDs.sql
Reorder auto increment IDs on MySQL
SET @count = 0;
UPDATE table_name SET table_name.id = @count:= @count + 1;
ALTER TABLE table_name AUTO_INCREMENT = 1;

Keybase proof

I hereby claim:

  • I am sooluh on github.
  • I am sooluh (https://keybase.io/sooluh) on keybase.
  • I have a public key ASA-uvhJ41DdFmSo0kKEy5PIk_a5o75I3O5I4f8zDNk9NQo

To claim this, I am signing this object:

@sooluh
sooluh / tmux.sh
Last active December 30, 2022 07:18
Create a new tmux session and run the command
#!/bin/bash
# Change the value of the PATH variable (optional)
PATH="/root/.nvm/versions/node/v14.15.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
tmux new-session -d -s session_name -n window_name
tmux send-keys -t session_name:window_name "cd /to/your/path" Enter
tmux send-keys -t session_name:window_name "run command here" Enter
@sooluh
sooluh / fullscreen-iframe.html
Last active June 20, 2023 03:17
Fullscreen Iframe
<html>
<head>
<title>Google</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<frameset frameborder="0" border="0" rows="*,100%" cols="100%" marginwidth="0" marginheight="0">
<frame target="frame1" name="frame1" marginwidth="0" marginheight="0" border="0" noresize scrolling="no" />
<frame target="frame2" name="frame2" src="https://google.co.id/" border="0" noresize />
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Example extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->library('GoogleGeocoder');
}