Skip to content

Instantly share code, notes, and snippets.

@rrevanth
rrevanth / end-session.md
Created February 6, 2025 01:42 — forked from zbeyens/end-session.md
Store these in your project .ai folder

End Session Instructions

  1. Create a new file: .ai/status/YYYY-MM-DD.md

  2. Structure the update with sections:

    • Development Steps
    • Key Decisions
    • Next Steps
@rrevanth
rrevanth / playercorefactory.xml
Created December 19, 2018 03:30 — forked from mrPrateek95/playercorefactory.xml
Make VLC as the default player on your Kodi Mac
<playercorefactory>
<players>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>/Applications/VLC.app/Contents/MacOS/VLC</filename>
<args>--video-on-top --play-and-exit</args>
<hidexbmc>true</hidexbmc>
</player>
</players>
<rules action="prepend">
<rule video="true" player="VLC"/>
@rrevanth
rrevanth / workout_form.ex
Created April 15, 2017 21:54 — forked from riverrun/workout_form.ex
Json / map in Phoenix form
<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<div class="form-group">
<%= label f, :type, class: "control-label" %>
<%= select f, :type, @workout_types, prompt: "Choose workout type", class: "form-control" %>
@rrevanth
rrevanth / brunch-config.js
Created March 20, 2017 04:15 — forked from dustinfarris/brunch-config.js
brunch config for using Elm with Phoenix 1.3-rc.0
exports.config = {
files: {
javascripts: {
joinTo: "js/app.js"
},
stylesheets: {
joinTo: "css/app.css"
},
templates: {
@rrevanth
rrevanth / Adding tmux
Created February 18, 2017 19:32 — forked from sshadmand/Adding tmux
The best and greatest tmux.conf ever
Create a tmux conf file
#> touch ~/.tmux.conf
Install TMP
#> git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
[Copy and paste tmux.conf below into local file.]
Load tmux configurations
#> tmux source-file ~/.tmux.conf
@rrevanth
rrevanth / perfectelementary.bash
Created August 19, 2016 04:25
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@rrevanth
rrevanth / 50-autobackup.rules
Created July 4, 2016 05:17 — forked from gerryk/50-autobackup.rules
UDEV rule to automatically backup stuff when I attach my backup drive
# UDEV rules to setup automatic backup upon disk insertion
# You can get the discriminant informations with the following command :
# udevinfo -a -p $(udevinfo -q path -n /dev/sda)
KERNEL=="sd?1", ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="Maxtor", ATTRS{model}=="Basics Portable", RUN+="/root/autobackup.sh %k"
@rrevanth
rrevanth / composer.json
Created June 14, 2016 04:18 — forked from tobsn/composer.json
deploy magento on elastic beanstalk with composer post install command to write production config
{
"require": {
"magento-hackathon/magento-composer-installer": "3.0.*",
"aydin-hassan/magento-core-composer-installer": "^1.3",
"firegento/magento": "1.9.2.2"
},
"extra": {
"magento-root-dir": "htdocs",
"auto-append-gitignore": true,
"magento-deploystrategy": "copy",
@rrevanth
rrevanth / PushNotifications.php
Created April 26, 2016 05:02 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
import superagent from 'superagent';
import merge from 'lodash/merge';
import { camelizeKeys, decamelizeKeys } from 'humps';
import config from 'config';
const CALL_API = Symbol.for('Call API');
/**
* Prepare headers for each request and include the token for authentication.
* @param {Boolean} token Authentication token