These rules are adopted from the AngularJS commit conventions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
#clone the repo | |
git clone -q "${1}" "clones/${2}" | |
cd "clones/${2}" | |
#update the submodules (how do we handle errors here?) | |
git submodule --quiet update --init --recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Class DocDB { | |
private $key; | |
private $url; | |
private $file; | |
private $json; | |
private $rows; | |
private $data = array(); | |
private $columns = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Illuminate DB Class | |
* | |
* @author rutoru | |
* @package Runa-CCA | |
* @license http://www.opensource.org/licenses/mit-license.php 2014 rutoru | |
*/ | |
namespace Runa_CCA\Model; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function json_response($code = 200, $message = null) | |
{ | |
// clear the old headers | |
header_remove(); | |
// set the actual code | |
http_response_code($code); | |
// set the header to make sure cache is forced | |
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set PATH=%PATH%;C:\Program Files\TortoiseSVN\bin | |
git stash: svn diff > patch_name.patch; svn revert -R . | |
git stash apply: patch patch_name.patch | |
based on stackoverflow answer: http://stackoverflow.com/questions/1554278/temporarily-put-away-uncommited-changes-in-subversion-a-la-git-stash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create animated GIFs with mpv | |
-- Requires ffmpeg. | |
-- Adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
-- Usage: "g" to set start frame, "G" to set end frame, "Ctrl+g" to create. | |
local msg = require 'mp.msg' | |
-- Set this to the filters to pass into ffmpeg's -vf option. | |
-- filters="fps=24,scale=320:-1:flags=lanczos" | |
filters="fps=15,scale=540:-1:flags=lanczos" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// just an example. A cleaner way is to wrap the showLine-stuff in a dedicated component | |
<template> | |
<div> | |
<my-line v-if="showLine" :data="lineData" :options="options"> | |
</div> | |
</template> | |
<script> | |
export default { | |
data () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You can call this script like this: | |
# $./volume.sh up | |
# $./volume.sh down | |
# $./volume.sh mute | |
function get_volume { | |
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1 | |
} |
OlderNewer