Skip to content

Instantly share code, notes, and snippets.

@bluecloudy
bluecloudy / yiidoctrine2_LICENSE
Created May 5, 2014 03:17
This is an extension for the Yii Framework that integrates Doctrine 2 ORM & ODM projects
The MIT License (MIT)
Copyright (c) 2014 bluecloudy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@bluecloudy
bluecloudy / cloudSettings
Last active January 14, 2022 14:17
Visual Studio Code Sync Settings Gist
{"lastUpload":"2020-12-11T10:01:40.783Z","extensionVersion":"v3.4.3"}
@bluecloudy
bluecloudy / gql-directives.js
Created June 11, 2017 15:54 — forked from voodooattack/gql-directives.js
GraphQL-Sequelize auto-model functionality. Directly translates the schema language into database models via directives.
const { parse, visit, print, Kind, BREAK } = require('graphql/language');
const { buildASTSchema } = require('graphql/utilities');
const { addResolveFunctionsToSchema } = require('graphql-tools');
const Sequelize = require('sequelize');
const { graphql } = require('graphql');
const jexl = require('jexl');
const deepAssign = require('deep-assign');
const { resolver: sequelizeResolver } = require('graphql-sequelize');
const { inspect } = require('util');
require 'rails_event_store'
require 'aggregate_root'
PaymentAuthorized = Class.new(RailsEventStore::Event)
PaymentSuccessed = Class.new(RailsEventStore::Event)
PaymentFailed = Class.new(RailsEventStore::Event)
PaymentCaptured = Class.new(RailsEventStore::Event)
class Payment
InvalidOperation = Class.new(StandardError)
@bluecloudy
bluecloudy / docker_for_wsl.md
Last active March 12, 2024 01:22
WSL: Docker for WSL
@bluecloudy
bluecloudy / WSL Install Guide.md
Last active February 2, 2020 10:37 — forked from kevbost/WSL Install Guide.md
WSL Install Guide Windows

Ubuntu

Windows Subsystem for Linux [Very Easy Installation]

  1. https://msdn.microsoft.com/commandline/wsl/install_guide
    • [Follow instructions carefully and remember your password]
    • [it will prompt for password]
    • [password will not appear while you type, just push enter when finished]
  2. Open "Bash on Ubuntu on Windows"
  3. Run the commands formatted as code separately
  • (they will take a while to complete)
@bluecloudy
bluecloudy / wsl_vscode_git_and_gitlens.md
Last active April 9, 2019 11:51
WSL: VSCode git and gitlens support

WSL

VSCode git and gitlens support

  1. VSCode git and gitlens
    • download [WSLGit at https://github.com/andy-5/wslgit/releases]
    • rename [wslgit.exe or wslgit-mount-at-root.exe to git.exe]
    • edit [edit window environment variables to add C:\CHANGE\TO\PATH\TO\git.exe to Path]
    • edit [edit window environment variables to add WSLGIT_USE_INTERACTIVE_SHELL with value false or 0]
    • edit [edit VSCode settings.json to add/edit "git.path": "C:\CHANGE\TO\PATH\TO\git.exe"]
@bluecloudy
bluecloudy / doom.txt
Created June 13, 2019 09:12 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@bluecloudy
bluecloudy / manjaro_kde_ntfs.md
Last active July 24, 2019 14:52
Manjaro KDE Auto mount NTFS
  1. Auto mount NTFS

    • list [List disk by uuid: "ls -l /dev/disk/by-uuid"]
    • edit [Add to fstab: "/dev/disk/by-uuid/{UUID} /mnt/{name} auto nosuid,nodev,nofail,x-gvfs-show 0 0"]
    • execute [Execute command: "sudo mount -a"]
  2. Fix NTFS mount problem

    • list [List disk by label: "ls -l /dev/disk/by-label"]
    • execute [Execute command: "sudo ntfsfix /dev/sdXY"]

This is a quick set-up guide on how to install Icecast for Mp3 and Ogg streaming, sort of online radio. Tested on Debian Wheezy. Probably works on Ubuntu, etc. Icecast is a "server-like". It offers the HTTP URL/port through which end-users can play the media. However, Icecast itself does not serve the files. It must get its input from other "client-like" software. For example, Ices0 sends mp3 input to Icecast and then Icecast delivers to the end user. Similarly, Ices2 sends ogg input to Icecast and then Icecast delivers to the end user.

Set up icecast

Start by installing:

sudo apt-get install icecast2