Skip to content

Instantly share code, notes, and snippets.

View johnt1000's full-sized avatar
🐞
if without condition

Jônatas Rodrigues johnt1000

🐞
if without condition
View GitHub Profile
# https://sid-500.com/2018/04/02/powershell-how-to-get-a-list-of-all-installed-software-on-remote-computers/
# Get-CimInstance -ComputerName (Get-Content C:\Temp\Computer.txt) -ClassName win32_product -ErrorAction SilentlyContinue| Select-Object PSComputerName, Name, PackageName, InstallDate | Out-GridView
# (Get-ADComputer -Filter * -Searchbase "OU=Test,DC=sid-500,DC=com").Name | Out-File C:\Temp\Computer.txt | notepad C:\Temp\Computer.txt
# https://powershell.org/forums/topic/uninstall-software-remotely/
# $app = Get-WmiObject Win32_Product -computername "PC1" | where { $_.name -eq "softwarename" }
# $app.Uninstall()
Get-WmiObject win32_product -computername "NTB" | Select-Object Name, Vendor, Version | Out-GridView
$app = Get-WmiObject Win32_Product -computername "NTB" | where { $_.name -eq "Adobe AIR" }
@johnt1000
johnt1000 / abrev.rb
Last active January 30, 2019 00:11
Script para abreviar nomes, escrito em Ruby
max_char = 13
arr_nome = "Jonatas Rodrigues Alves".split
len_nome = 0
abr_nome = ""
arr_nome.each_with_index do |palavra , i|
if i == 0
abr_nome.concat(palavra)
else
len_previsto = palavra.length + 1 + len_nome.to_i
@johnt1000
johnt1000 / install-docker.sh
Created November 7, 2018 18:49 — forked from dweldon/install-docker.sh
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@johnt1000
johnt1000 / Vagrantfile
Created November 28, 2016 20:19
Install Zabbix 3 in VM Vagrant ubuntu/trusty64
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
http://dynupdate.no-ip.com/ip.php
https://api.ipify.org
This might work for you:
# mkdir temp && cd temp && touch file.{a..e}
# ls
file.a file.b file.c file.d file.e
# md5sum * | sed -e 's/\([^ ]*\) \(.*\(\..*\)\)$/mv -v \2 \1\3/' | sh
`file.a' -> `d41d8cd98f00b204e9800998ecf8427e.a'
`file.b' -> `d41d8cd98f00b204e9800998ecf8427e.b'
`file.c' -> `d41d8cd98f00b204e9800998ecf8427e.c'
`file.d' -> `d41d8cd98f00b204e9800998ecf8427e.d'
wildcard ?
# -----------------------------------------------------------
# some signatures that may be helpful
# -----------------------------------------------------------
gpg y 2500000 \x8c\x0d\x04\x03\x03\x02
png y 2500000 \x89\x50\x4e\x47\x0d\x0a\x1a\x0a \x49\x45\x4e\x44
kdb y 2500000 \x03\xd9\xa2\x9a\x65\xfb\x4b\xb5
kdbx y 2500000 \x03\xd9\xa2\x9a\x66\xfb\x4b\xb5
@johnt1000
johnt1000 / inflections.rb
Created February 12, 2016 16:22 — forked from mateusg/inflections.rb
pt-BR inflections file for Ruby on Rails applications
# encoding: utf-8
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at