This file contains hidden or 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
for i in *; do | |
if [ ! \( -f "${i}" \) ] | |
then | |
FILENAME=$i | |
LINK=`readlink "$i"` | |
echo "Removing bad symlink $i" | |
rm "$i" | |
NEWLINK="${LINK/$1/$2}" | |
echo "Replacing $i from $LINK to $NEWLINK" | |
ln -s "$NEWLINK" "$FILENAME" |
This file contains hidden or 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
(setq geben-path-mappings '(("/home/moises/dev/my-project" "/vagrant"))) |
This file contains hidden or 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 | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
This file contains hidden or 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/sh | |
SOURCEDIR='/downloaded/torrents/directory/absolute/path' | |
TARGETDIR='/target/directory/absolute/path/' | |
counter=0 | |
find $SOURCEDIR -type f -exec file -N -i -- {} + | sed -n 's!: video/[^:]*$!!p' | while read -r file | |
do | |
output=$(date +"%s")-${counter}_${file##*/} | |
mv "${file}" "${TARGETDIR}/${output}" |
This file contains hidden or 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
(defun twig-trans-text (text) | |
"print-a-text-in-a-twig-trans-label" | |
(interactive "sText:") | |
(insert (concat "{% trans %}" text "{% endtrans %}")) | |
) | |
(defun twig-trans-region () | |
"include-a-region-between-trans-labels" | |
(interactive) | |
"print-a-text-in-a-twig-trans-label" |
This file contains hidden or 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
(defun jean-claude (var) | |
"print-a-php-var-dump" | |
(interactive "sVar:") | |
(setq init-point (point)) | |
(insert (concat "echo '<pre>';\nvar_dump(" var ");\necho '<\pre>';")) | |
(indent-region init-point (point)) | |
) | |
(defun doctrine-jean-claude (var) | |
"print-a-php-var-dump" |
This file contains hidden or 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
from pymongo import Connection | |
import yaml, datetime, smtplib | |
class Logger(): | |
def set_message(self, message): | |
mongo = Mongo() | |
mongo.insert_message(message) | |
This file contains hidden or 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
(defun phpdoc () | |
"print-the-php-documentor-block" | |
(interactive) | |
(search-backward " function") | |
(setq method-name (phpdoc-get-method-description)) | |
(phpdoc-block-position) | |
(setq init-block-point (point)) | |
(phpdoc-start-line) | |
(phpdoc-new-line method-name) | |
(phpdoc-new-line) |
This file contains hidden or 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 python | |
from twisted.web import server, resource | |
from twisted.internet import reactor | |
from twisted.python import log | |
import sys | |
from datetime import datetime | |
class Root(resource.Resource): | |
def render_GET(self, request): | |
return 'Welcome to Picmnt Api' |
NewerOlder