Skip to content

Instantly share code, notes, and snippets.

View doraemonxxx's full-sized avatar
:octocat:
Toxic and Hypocrite

mew doraemonxxx

:octocat:
Toxic and Hypocrite
View GitHub Profile
@markasoftware
markasoftware / enterprise_token.rb
Last active May 9, 2025 12:57
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@pLavrenov
pLavrenov / forge.sh
Created July 29, 2020 23:29
Laravel Forge Setup Script (July 2020) - NGINX + MySQL
# Replace!
# [!server!] (the forge server instance)
# [!sudo_password!] (random password for sudo)
# [!db_password!] (random password for database user)
# [!user.name!] (git user name)
# [!user.email!] (git user email)
# [!server_ip!] (git user email)
#
# REQUIRES:
@huangsam
huangsam / app.py
Created October 11, 2019 06:53
Long polling demo with Flask + axios
from datetime import datetime
from random import randint
from time import sleep
from flask import Flask, jsonify, render_template
app = Flask(__name__)

Windows 10 - Using Git Bash With TMUX

Why Not Use WSL?

I tried the WSL and it isn't quite seamless enough for me. I ran in to problems when editing in VSCode and having watchers on my files (ng serve, dotnet watch run, etc.). In addition, I kept running in to problems that only manifest themselves when running in WSL. For example, this issue with doing production builds and the terser plugin has made many a developer rage-quit on using WSL. Just figuring out that it was an issue with the WSL took a lot of time.

That terser plugin issue was never resolved and I ended up having to keep a git bash window open in addition to my WSL console window so I could do production builds. To make matters worse, my npm packages were platform-dependent so I couldn't use the same project folder. So, my procedure was: commit whatever changes to test branch, push to repo, git pull on my "windows" project folder, and do a production build there

@ivan-marquez
ivan-marquez / polling.js
Last active February 3, 2024 00:13
Long polling implementation in Js
const axios = require('axios').default;
function getAPIClient() {
const axiosConfig = {
baseURL: 'https://csrng.net/csrng/csrng.php',
timeout: 5000,
};
return axios.create(axiosConfig);
}
@Splode
Splode / Laravel-Scheduler-Windows.md
Last active April 29, 2025 09:23
Laravel Scheduler on Windows

Run Laravel Scheduled Tasks on Windows

The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.

Create a Scheduled Task

  1. Open Task Scheduler
  2. Select Create Task...
  3. Give the task a name and description
  4. To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active May 11, 2025 11:00
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@mapmakerdavid
mapmakerdavid / usable-gis-data-philippines.csv
Last active April 21, 2025 17:16
Usable GIS data about the Philippines
THEME FORMAT SOURCE LINK
roads, waterways, building footprints, points of interest shp, pbf OpenStreetMap (OSM) http://download.geofabrik.de/asia/philippines.html
administrative boundaries (country, region, province, municipality, city) shp PSA, NAMRIA, DROMIC, UNOCHA, and patners https://data.humdata.org/dataset/philippines-administrative-levels-0-to-3
administrative boundaries (barangay) shp PSA, NAMRIA, DROMIC, UNOCHA, and patners https://data.humdata.org/dataset/philippines-admin4-boundaries-barangay
framework data (boundaries, roads, elevation, population, etc.) various DIVA-GIS http://www.diva-gis.org/gdata
topographic maps (1:50,000 and 1:250,000) non-georeferenced raster NAMRIA http://www.namria.gov.ph/download.php
various geohazards shp NOAH http://noah.up.edu.ph/downloads/
various geohazards shp DREAM https://lipad.dream.upd.edu.ph/
various geohazards shp MGB http://www.namria.gov.ph/download.php
various geohazards shp PHIVOLCS http://www.phivolcs.dost.gov.ph/
@charleslouis
charleslouis / composer-private-package-github-token.md
Created July 24, 2018 06:55 — forked from jeffersonmartin/composer-private-package-github-token.md
Generate a GitHub Personal Access Token for Private Composer Packages

Generate a GitHub Personal Access Token for Private Composer Packages

If you're trying to load a private repository with Composer/Laravel, we'll need to generate a GitHub Personal Access Token (similar to OAuth token) to access the repository during a composer install without entering credentials.

If you have used other Github packages from {my-org} before, you may be able to skip this step.

  1. Visit https://github.com/settings/tokens.

  2. Click Generate new token.

@BenSampo
BenSampo / deploy.sh
Last active May 11, 2025 06:59
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH