Skip to content

Instantly share code, notes, and snippets.

View vianaweb's full-sized avatar
🏠
Working from home

Evandro Viana vianaweb

🏠
Working from home
View GitHub Profile
@kjaymiller
kjaymiller / text_to_things3.scptd
Last active October 7, 2021 22:24
AppleScript Import Text to Things3
on run {input, parameters}
set delimitedList to paragraphs of (input as string)
tell application "Things3"
repeat with currentTodo in reverse of delimitedList
set newToDo to make new to do with properties {name:currentTodo} at beginning of list "Inbox"
end repeat
end tell
end run
OpenBSD 6.0-beta (GENERIC.MP-vmm) #5: Fri Jun 3 16:44:43 CEST 2016
reyk@bsd.plumbing:/usr/src/sys/arch/amd64/compile/GENERIC.MP-vmm
real mem = 17024200704 (16235MB)
avail mem = 16503730176 (15739MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xd7bfb000 (65 entries)
bios0: vendor LENOVO version "N1FET38W (1.12 )" date 03/30/2016
bios0: LENOVO 20FBCTO1WW
OpenBSD 5.9 (GENERIC.MP) #163: Wed Feb 17 22:48:13 CET 2016
mike@esdenera.com:/usr/obj/sys/arch/amd64/compile/GENERIC.MP
real mem = 520028160 (495MB)
avail mem = 500105216 (476MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf8ec0 (216 entries)
bios0: vendor American Megatrends Inc. version "090006" date 05/23/2012
bios0: Microsoft Corporation Virtual Machine
@takeshixx
takeshixx / hb-test.py
Last active July 4, 2024 03:29
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@tkalfigo
tkalfigo / .psqlrc
Last active September 11, 2017 22:00
My .psqlrc
\set QUIET 1
\pset null '(null)'
\pset linestyle unicode
\pset border 2
\timing
\set ON_ERROR_ROLLBACK interactive
\set HISTFILE ~/.psql_history- :HOST - :DBNAME
\set HISTSIZE 2000
\set PROMPT1 '%n@%/[%M:%>] # '
\set PROMPT2 '> '
@eminetto
eminetto / gist:5440100
Created April 23, 2013 01:23
Vagrantfile com duas máquinas
Vagrant.configure("2") do |config|
config.vm.define :default do |default|
default.vm.box = "precise32"
default.vm.network :forwarded_port, guest: 80, host: 8080
end
config.vm.define :lts do |lts|
lts.vm.box = "lts"
lts.vm.network :forwarded_port, guest: 80, host: 8081
@eminetto
eminetto / gist:5440093
Created April 23, 2013 01:22
Vagrantfile para uma máquina
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.network :forwarded_port, guest: 3306, host: 3306
config.vm.network :forwarded_port, guest: 5432, host: 5432
config.vm.provision :shell, :path => "install.sh"
end
@fnando
fnando / Vagrantfile
Last active December 14, 2015 23:19
My single-box Vagrant settings, VMware Fusion Edition.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.network :private_network, ip: "192.168.33.2"
config.vm.synced_folder ".", "/Projects", id: "vagrant-root"
config.vm.provider(:vmware_fusion) do |v|
v.vmx["memsize"] = "2048"
@mattt
mattt / uiappearance-selector.md
Last active June 4, 2024 13:28
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
@fnando
fnando / README.md
Last active December 11, 2015 01:48

He-he-hey!

I'm experimenting with running specs and other Ruby files inside the Vagrant box from the Sublime Text 2 editor, without the SSH connection delay (which was taking ~5s).

So I managed to run these files by using the Virtualbox API. The requirement for running specs for Rails apps is creating a project file. This will the the $project_path variable, which is the root directory.

Another thing I did is mapping my projects directory to the same path inside Vagrant. This can be done by using something like the following on your Vagrantfile:

Vagrant::Config.run do |config|