Skip to content

Instantly share code, notes, and snippets.

View rognales's full-sized avatar
🏠
Working from home

Zaiman Noris rognales

🏠
Working from home
View GitHub Profile
@christiangenco
christiangenco / migrateHeroicons.js
Last active March 29, 2024 11:34 — forked from PicchiKevin/migrate.sh
Heroicons v1 to v2
const fs = require("fs");
if (!fs.existsSync("package.json")) {
console.error(
"Cannot find package.json. Please run this script in your project directory."
);
process.exit(1);
}
const package = fs.readFileSync("package.json", "utf8");
@mapehe
mapehe / rant.md
Last active December 5, 2021 09:17
don't know why i wrote this

Rant: I'm sick and tired of cryptobros.

I'm gonna go out on a limb here and claim that the general interest in cryptocurrencies is directly proportional to the BTC/USD rate.

Remember the 2018 bubble, when everyone made delusional claims along the lines of the blockchain will replace the internet? It got so big that even a bunch of companies bought the hype. Cash was thrown at business projects that made no goddamn sense: I distinctly remember asking the Finnish MD of a major financial organization how their blockchain proof-of-concept was supposed to work. They

@BinaryKitten
BinaryKitten / toRawSql.php
Last active January 22, 2023 21:52
toRawSql.php
<?php
declare(strict_types=1);
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Query\Builder as QueryBuilder;
QueryBuilder::macro(
'toRawSql',
function () {
@nokidding
nokidding / updateNpm.bat
Created March 31, 2020 13:08
Windows batch file which updates npm for nvm-windows
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
@AntonFriberg
AntonFriberg / Dockerfile
Last active July 10, 2023 08:50
Simple docker cron sidecar container based on alpine image
FROM alpine:3.8
# Alpine comes with built in cron schedules
# min hour day month weekday command
# */15 * * * * run-parts /etc/periodic/15min
# 0 * * * * run-parts /etc/periodic/hourly
# 0 2 * * * run-parts /etc/periodic/daily
# 0 3 * * 6 run-parts /etc/periodic/weekly
# 0 5 1 * * run-parts /etc/periodic/monthly
@matthewpalmer
matthewpalmer / pod.yaml
Created July 21, 2018 04:13
kubernetes nginx php-fpm pod
# Create a pod containing the PHP-FPM application (my-php-app)
# and nginx, each mounting the `shared-files` volume to their
# respective /var/www/html directories.
kind: Pod
apiVersion: v1
metadata:
name: phpfpm-nginx-example
spec:
volumes:
@giansalex
giansalex / docker-php-ext-install.md
Last active October 3, 2023 10:02
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 26, 2024 16:33 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@daliborgogic
daliborgogic / entry-client.js
Last active July 1, 2019 09:51
Vue.js SPA Google Analytics
// https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
)