Skip to content

Instantly share code, notes, and snippets.

View RamiroCampa's full-sized avatar

Ramiro RamiroCampa

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
namespace Technical
{
public class PasswordGenerator
{
/// <summary>
@RamiroCampa
RamiroCampa / jscompress.bat
Created December 15, 2014 04:14
Simple Utility to run JavaScript compressor from Command Line
@Echo Off
rem Download Closure compiler from: http://dl.google.com/closure-compiler/compiler-latest.zip
echo JavaScript code Compressor
echo Processing archive %1
echo Output to .
java -jar C:\Path to compiler.jar\compiler.jar %1 --js_output_file=%~n1-compressed%~x1
echo 
echo Finished...
@RamiroCampa
RamiroCampa / csscompress.bat
Last active August 29, 2015 14:11
Simple Utility to run CSS compressor from Command Line (modify to your version of yuicompresssor)
@Echo Off
rem Download YUI Compressor from: https://github.com/yui/yuicompressor/releases/latest
echo CSS Compressor
echo Processing file %1
echo Output to .
java -jar C:\Users\YUIcompressorPath\yuicompressor-2.4.8.jar %1 --type css -o %~n1-compressed%~x1
echo 
echo Finished...
@RamiroCampa
RamiroCampa / hiberdisable.bat
Created December 15, 2014 03:59
Basic Utility to Disable Hibernate option in Windows 7
@echo off
echo Disables hibernate option in windows 7 (hiberfile.sys disappears)
echo Must be run in prompt with privileges
powercfg.exe -h off
@RamiroCampa
RamiroCampa / jadew.bat
Last active August 29, 2015 14:11
Simple Utility to convert .jade files to HTML using jade package (win)
@echo off
rem you must already have installed package jade in npm: npm install jade --global
echo Usage jadew.bat in a directory with .jade files
set "files="
for /f %%F in ('dir /b *.jade') do call set files=%%files%% "%%F"
jade -w --pretty %files%
@RamiroCampa
RamiroCampa / flac2mp3.bat
Created December 15, 2014 03:53
Simple Utility to convert Flac to mp3 using flac and lame CLI (win)
@echo off
echo flac2mp3.bat
echo Version : 0.1
echo Flac CLI and LAME CLI version should be already installed
echo this batch file must be in a path or within the same directory to convert files
echo Example:
echo "cd c:\Users\YourUsername\Music\myfavouriteflacalbum"
echo "flac2mp3" + ENTER
echo Decompressing to .wav files .flac files in folder
for /f "delims=" %%i in ('dir /b "*.flac"') do (
@RamiroCampa
RamiroCampa / htmlcompress.bat
Created December 13, 2014 23:22
Simple Utility to run HTML compressor from Command Line
@rem java -jar htmlcompressor.jar [options] [input]
@Echo Off
echo HTML Compressor
echo Processing Archive %1
echo Salida a %~n1-compressed%~x1
java -jar C:\yourpathtohtmlcompressor\htmlcompressor-1.5.3.jar -t html -o .\%~n1-compressed%~x1 %1
echo 
echo Terminated...
@RamiroCampa
RamiroCampa / subl.bat
Last active August 29, 2015 14:11
Simple Utility to Run Sublime Text in current directory or selected file (automation)
@echo off
echo You already have had on environmental variables the path to Sublime Text
echo Example: d:\projects> subl .
echo Executing Sublime Text!!!
start sublime_text.exe %1
@RamiroCampa
RamiroCampa / KillWinamp.bat
Created December 13, 2014 23:06
Basic Utility to Kill Winamp Process (hangs)
@echo off
echo KillWinamp Running...
TASKKILL /F /IM winamp.exe
@RamiroCampa
RamiroCampa / Custom_fields_1
Created July 29, 2013 19:17
Experimenting With Custom Fields Following Tutorial on Perishable Press: http://perishablepress.com/wordpress-custom-fields-tutorial/ I am Using Thematic as a framework
// Function that returns Custom Field Named "post-icon" and displays it like an image wrapped in an anchor on screen
function test_custom_fields(){
global $post;
query_posts('showposts=3&offset=0');
if (have_posts()) : while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID, 'post-icon', true); ?>" alt="Icon for Post #<?php the_ID(); ?>" width="120" height="120"/></a>
<?php
endwhile;
endif;