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 python | |
# -*- coding: utf-8 -*- | |
# | |
# System: macOS 12+ | |
# Version: TeamViewer v15.x.x | |
# Python: 3.x.x | |
# Command: sudo python TeamViewer-15-id-changer.py | |
# | |
import os |
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 ruby | |
# Debian pkg dependencies: | |
# - pngcrush | |
# - libjpeg-progs | |
# - imagemagick | |
# Usage: optimize-images graphic1.png photo1.jpeg bash-glob-exp1 | |
require "fileutils" |
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
brew tap homebrew/versions | |
brew install v8-315 | |
gem install libv8 -v '3.16.14.13' -- --with-system-v8 | |
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315 | |
bundle install |
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
# If you don't remember the exact path/name, search the log for deleted files | |
git log --diff-filter=D --summary | grep delete | |
# Find the file you want to get from the ouput, and use the path | |
# Find the commits that involved that path | |
git log --all -- some/path/to/deleted.file | |
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted) | |
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file |
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
function removeComments(html) { | |
return (''+html) | |
.replace/*HTMLComments*/(/<!-[\S\s]*?-->/gm, '') | |
.replace/*JSBlockComments*/(/\/\*[\S\s]*?\*\//gm,'') | |
.replace/*JSLineComments*/(/^.*?\/\/.*/gm, '$1') // FIXME | |
} |
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
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
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
// Styles needed to fix layout | |
.pp{ margin-left: 0px !important; margin-right:0px !important;} | |
.q0CeU{ margin-right:0px !important} | |
// Execute this in the inspector window or the address bar, or bookmark it if you can | |
javascript:i=document.getElementById("canvas_frame").contentWindow.document;j=i.getElementsByClassName("T0 pp");for(k=0;k<j.length;k++)if(j.item(k).getElementsByClassName("pw").item(0).innerHTML=="Chat")j.item(k).style.margin='0';i.getElementsByClassName("nH q0CeU z").item(0).style.marginRight='0';void 0 |
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
class Avatar < ActiveRecord::Base | |
attr_accessor :content_type, :original_filename, :image_data | |
before_save :decode_base64_image | |
has_attached_file :image, | |
PAPERCLIP_CONFIG.merge( | |
:styles => { | |
:thumb => '32x32#', | |
:medium => '64x64#', |
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
require "net/http" | |
require "uri" | |
def get_cpa(calle, altura) | |
url = "http://www3.correoargentino.com.ar/scriptsN/cpa/cpa_calle.idc" | |
res = Net::HTTP.post_form(URI.parse(url), { | |
:codloca => "5001", | |
:pnc => calle, | |
:alt => altura | |
}) |