Skip to content

Instantly share code, notes, and snippets.

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

Geni Jaho GeniJaho

🏠
Working from home
View GitHub Profile
@askasim
askasim / ThemeSwitcher.vue
Last active May 1, 2024 04:56
Laravel Jetstream Dark Mode Switch
<template>
<div class="flex justify-center">
<div class="relative">
<button
class="flex text-md border-2 border-transparent rounded-full focus:outline-none focus:border-gray-300 transition"
@click="toggleDropdown"
>
<SunIcon
v-if="option === 'light'"
class="h-6 w-6"
@eneajaho
eneajaho / config.md
Last active May 3, 2024 10:34
Angular ESLint & Prettier Configuration

Install Angular ESLint

ng add @angular-eslint/schematics

Install Prettier and Prettier-ESLint dependencies

npm install prettier prettier-eslint eslint-config-prettier eslint-plugin-prettier --save-dev

ESLint configuration

Filename: .eslintrc.json

@adimancv
adimancv / css_dark_mode_gist_embed_code.css
Last active December 8, 2023 20:37
CSS Dark Mode Gist Embed Code
/*!
* Gist DarkCode ver 0.2.1
* Update 03/12/2021 www.adiman.web.id
*/
.gist{font-size: 18px}.gist-meta, .gist-file, .octotree_toggle, ul.comparison-list > li.title,button.button, a.button, span.button, button.minibutton, a.minibutton,span.minibutton, .clone-url-button > .clone-url-link{background: linear-gradient(#202020, #181818) !important;border-color: #383838 !important;border-radius: 0 0 3px 3px !important;text-shadow: none !important;color: #b5b5b5 !important}.markdown-format pre, .markdown-body pre, .markdown-format .highlight pre,.markdown-body .highlight pre, body.blog pre, #facebox pre, .blob-expanded,.terminal, .copyable-terminal, #notebook .input_area, .blob-code-context,.markdown-format code, body.blog pre > code, .api pre, .api code,.CodeMirror,.highlight{background-color: #1D1F21!important;color: #C5C8C6!important}.gist .blob-code{padding: 1px 10px !important;text-align: left;background: #000;border: 0}::selection{background: #24890d;color: #fff;text-shadow: none}::-moz-selection{background:
@tomsaleeba
tomsaleeba / README.md
Created May 15, 2018 08:01
Deleting batches of records with SPARQL

I learned this when trying to clear our records in AWS Neptune. I was hitting the query timeout when trying to drop an entire graph. If you don't want to/can't raise the timeout, you can drop smaller parts of the graph in each transaction.

curl -sX POST http://<cluster-prefix>.rds.amazonaws.com:8182/sparql --data-urlencode 'update=
DELETE {
  GRAPH <http://aws.amazon.com/neptune/vocab/v01/DefaultNamedGraph> { ?s ?p ?o }
}
WHERE {
  GRAPH <http://aws.amazon.com/neptune/vocab/v01/DefaultNamedGraph> {
 {
@alfhh
alfhh / xmapp-replace-mariadb-with-mysql.md
Created November 14, 2017 15:36 — forked from odan/xmapp-replacing-mariadb-with-mysql.md
XAMPP - Replace MariaDB with MySQL

XAMPP - Replace MariaDB with MySQL

Since XAMPP 5.5.30 and 5.6.14, XAMPP ships MariaDB instead of MySQL. MariaDB is not 100% compatible with MySQL and can be replaced with the "orginal" MySQL server.

Backup

  • Backup the old database into a sql dump file
  • Stop the MariaDB service
  • Rename the folder: c:\xampp\mysql to c:\xampp\mariadb
@simonhamp
simonhamp / AppServiceProvider.php
Last active May 4, 2024 04:21
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@gunderson
gunderson / FlyCamera.cs
Last active January 15, 2024 16:31
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout