Skip to content

Instantly share code, notes, and snippets.

View dragonfire1119's full-sized avatar
😲
Turning ideas into reality!

Christopher dragonfire1119

😲
Turning ideas into reality!
View GitHub Profile
@dragonfire1119
dragonfire1119 / AppServiceProvider.php
Last active June 2, 2017 19:24
This is to fix the CORS pre-flight OPTIONS requests on lumen.
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Http\Response;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
@dragonfire1119
dragonfire1119 / 0_reuse_code.js
Created September 29, 2016 17:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dragonfire1119
dragonfire1119 / start-supervisord
Last active September 29, 2016 17:07
Start supervisord
Find the existing supervisord process and kill it
pgrep -fl supervisord
Run the following commands and you should have your worker running
supervisord -c /etc/supervisord.conf
supervisorctl -c /etc/supervisord.conf reload
supervisorctl -c /etc/supervisord.conf start laravel-worker:*
@dragonfire1119
dragonfire1119 / help-commands.txt
Created July 12, 2017 03:37
Helpful mac command line snippets
ps -p {processId} // See which app is running on that process id
@dragonfire1119
dragonfire1119 / install
Created January 30, 2019 22:30
Install Xcode with wget
For Chrome,
Install cookies.txt Chrome extension
Login to Apple Developer site and get the url for downloading
Run cookies.txt extension and download cookies.txt file
From the cookies.txt download directory, load cookies into wget and start resumable download. For example, to download Xcode_7.dmg, you would run:
wget --load-cookies=cookies.txt -c http://adcdownload.apple.com/Developer_Tools/Xcode_7/Xcode_7.dmg
Credit: https://stackoverflow.com/questions/4081568/downloading-xcode-with-wget-or-curl
@dragonfire1119
dragonfire1119 / gist:31914c92087468fb728f23be30cc793b
Created December 18, 2019 17:23
Step to Auto restart elasticsearch services after crash or down:
1) Edit elasticsearch service unit file using the following command
sudo systemctl edit elasticsearch.service
This command will create a file
/etc/systemd/system/elasticsearch.service.d/override.conf
2) Now, add the following lines in the unit file.
[Service]
Restart=always
@dragonfire1119
dragonfire1119 / adguardhome-sync-stack
Created May 30, 2023 21:02
Syncing two Adguard Homes together
---
version: "2.1"
volumes:
adguardhome-sync:
services:
adguardhome-sync:
image: ghcr.io/bakito/adguardhome-sync
container_name: adguardhome-sync
version: "3.5"
# The Scrypted docker-compose.yml file typically resides at:
# ~/.scrypted/docker-compose.yml
# Example volumes SMB (CIFS) and NFS.
# Uncomment only one.
# volumes:
# nvr:
version: '2'
services:
homebridge:
image: oznu/homebridge:latest
restart: always
network_mode: host
volumes:
- ./volumes/homebridge:/homebridge
logging:
driver: json-file
@dragonfire1119
dragonfire1119 / google-translate
Last active June 4, 2023 16:57
Home Assistant TTS to homepods
service: tts.google_translate_say
data:
entity_id: media_player.christophers_homepod
message: This is Christopher's Homepod playing on Google Translate!
cache: true
enabled: true