#Es6 + sass
package.json work babelify and browserify
{
"name": "es6_sass",
"version": "1.0.0",
"description": "",
#!/bin/bash | |
#rename id3 album | |
#output file with "_.mp3" | |
for file in myfolder/*.mp3; do | |
ffmpeg -i $file -acodec copy -metadata album="Mysite.CoM" "$( sed -e's/\.mp3/_.mp3/g' <<< $file )" | |
# convert to 128kbps | |
#ffmpeg -i $file -ab 128k "$( sed -e's/\.mp3/_.mp3/g' <<< $file )" | |
done |
sed -ri \"s/myjs\.js([^\"]+|)\"/min.js?$(date +%s)\"/g" ./mylayout.twig | |
#replace this | |
<script src="/myjs.js"></script> | |
or | |
<script src="/myjs.js?1487206735"></script> | |
with this | |
<script src="/myjs.js?2348392493284932"></script> |
#!/bin/bash | |
PROJECT="/home/nginx/domains/mywebiste/public" | |
PROJECT_STAGING="/home/nginx/domains/pre.mywebiste/public" | |
while read oldrev newrev ref | |
do | |
# guarda archivos modificados en variable | |
output_files="$(git diff-tree -r --name-only --no-commit-id $oldrev..$newrev)" | |
#comprueba la salida de los archivos modificados, si coincide con el primer param ejecuta el segundo param | |
check_run() { |
#Es6 + sass
package.json work babelify and browserify
{
"name": "es6_sass",
"version": "1.0.0",
"description": "",
#React es6
Trabajando con flux y react 2016
create folder
mkdir demo-flux && cd demo-flux
initialize npm
#Primeros pasos en GO
tipos
// tipo integer
var num int = 1
//tipo string
var str string = "hello"
//aqui no es necesario declarar var
//al colocar : go detecta el tipo a esto se le llama autotipado
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"io/ioutil" | |
"regexp" | |
) | |
const URL = "http://vmuzice.com/mp3/salsa" |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"encoding/json" | |
"io/ioutil" | |
) | |
const API_KEY = "38682c40bf52f8885ae2ba6dc6ffae81" |
##Mongo relation## test php mongo relational songs and users
init variables
<?php
$connect = new \MongoClient($this->settings['mongo_connection']);
$database = $connect->mydb;
$col_mp3 = $database->mp3;
$col_user = $database->user;
<?php | |
$folder = "./myfolder"; | |
$bucket = $folder."/bucket"; | |
$max_folders = 11; | |
$max_files = 5; | |
$name_file = "file".rand(9999,999999).".txt"; | |
$url_file = "./file.txt"; | |
$number = function($n){ return ($n<10) ? "0{$n}" : $n; }; | |
for ($i=0; $i < $max_folders; $i++) { |