Skip to content

Instantly share code, notes, and snippets.

View defrindr's full-sized avatar
👋
Hi there

Defri Indra Mahardika defrindr

👋
Hi there
View GitHub Profile
@defrindr
defrindr / extractor.php
Last active August 12, 2023 03:01
Generate Class Diagram Automatically (CODE IGNITER 3)
<?php
class extractor extends CI_Controller
{
private $workflow = false;
private $exception_ucwords = ["oa_helper"];
private $sanitized = ["'", '"', ",", " ", ";", "(", ")"];
public function getRealpath($type, $name)
{
@vsec7
vsec7 / BurpSuiteSSLPassTrough.json
Created June 25, 2020 11:43
Filter out the noise
{
"proxy":{
"ssl_pass_through":{
"automatically_add_entries_on_client_ssl_negotiation_failure":false,
"rules":[
{
"enabled":true,
"host":".*\\.google\\.com",
"protocol":"any"
},
@DanRibbens
DanRibbens / .docker\Dockerfile
Created May 25, 2020 18:06
docker-compose & dockerfile for PHP 7.4, Nginx, PostgreSQL
FROM php:7.4-fpm
# Copy composer.lock and composer.json
COPY ../composer.lock composer.json /var/www/
# Set working directory
WORKDIR /var/www
# Install dependencies
RUN apt-get update && apt-get install -y \
@sualeh
sualeh / How to Use git to Find Modified Files.md
Last active July 7, 2021 09:40
How to Use git to Find Modified Files

Introduction

I keep a number of personal files on my computer, organized in folders. These could be photos, financial information, and so on. As I work with these files, I add to them, sometimes modify them to edit a photo, or add to notes, and move or rename them in various ways to reorganize. I wanted a good way to keep track of these changes.

My first thought is that I would write a Python program to scan the folders, and print MD5 checksums of each file in a readable way. This way, I could save off the old "index", and compare it with a new index using a standard diff tool. My attempt at this program is sualeh/diff-name-only. My disclaimer if you look at the code is that I am still teaching myself Python, and have not reached the heights of Pythonic Zen.

As I was writing this code, I was struck by how much of what I needed was already done by a standard source control system such as git. I could simply use git, and solve my problems. However, git keeps tr

@lynt-smitka
lynt-smitka / .htaccess
Last active January 27, 2024 05:56
Block hidden files except .well-known - Apache .htaccess + Nginx
RewriteRule "(^|/)\.(?!well-known\/)" - [F]
@bmaupin
bmaupin / free-backend-hosting.md
Last active May 3, 2024 18:14
Free backend hosting
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active May 5, 2024 06:11
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@turbo
turbo / std.md
Last active April 14, 2024 09:18
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 6 columns, instead of 4. in line 8.
datasetName,about,link,categoryName,cloud,vintage
Microbiome Project,American Gut (Microbiome Project),https://github.com/biocore/American-Gut,Biology,GitHub,NA
GloBI,Global Biotic Interactions (GloBI),https://github.com/jhpoelen/eol-globi-data/wiki#accessing-species-interaction-data,Biology,GitHub,NA
Global Climate,Global Climate Data Since 1929,http://en.tutiempo.net/climate,Climate/Weather,,1929
CommonCraw 2012,3.5B Web Pages from CommonCraw 2012,http://www.bigdatanews.com/profiles/blogs/big-data-set-3-5-billion-web-pages-made-available-for-all-of-us,Computer Networks,,2012
Indiana Webclicks,53.5B Web clicks of 100K users in Indiana Univ.,http://cnets.indiana.edu/groups/nan/webtraffic/click-dataset/,Computer Networks,,NA
Criteo click-through,Criteo click-through data,http://labs.criteo.com/2015/03/criteo-releases-its-new-dataset/,Computer Networks,,NA
ICWSM 2009,ICWSM Data Challenge (since 2009),http://icwsm.cs.umbc.edu/,Data Challenges,,2009
KDD Cup,KDD Cup by Tencent 2012,http://www.kddcup2012.org/,Data
@guangrei
guangrei / script.php
Last active September 27, 2023 16:34
[PHP] pengecekan tanggal merah berdasarkan hari libur nasional dan hari minggu
<?php
//default time zone
date_default_timezone_set("Asia/Jakarta");
//fungsi check tanggal merah
function tanggalMerah($value) {
$array = json_decode(file_get_contents("https://raw.githubusercontent.com/guangrei/APIHariLibur_V2/main/calendar.json"),true);
//check tanggal merah berdasarkan libur nasional
if(isset($array[$value]) && $array[$value]["holiday"])
: echo"tanggal merah\n";