Skip to content

Instantly share code, notes, and snippets.

View ottodevs's full-sized avatar
🥷
Hacking

Otto G ottodevs

🥷
Hacking
View GitHub Profile
@ottodevs
ottodevs / CrossOver.sh
Created March 9, 2024 20:23 — forked from santaklouse/CrossOver.sh
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@ottodevs
ottodevs / StringToLower.sol
Created September 26, 2017 11:22 — forked from thomasmaclean/StringToLower.sol
Ethereum/Solidity toLower() equivalent, to transform strings to lowercase
pragma solidity ^0.4.11;
contract StringToLower {
function _toLower(string str) internal returns (string) {
bytes memory bStr = bytes(str);
bytes memory bLower = new bytes(bStr.length);
for (uint i = 0; i < bStr.length; i++) {
// Uppercase character...
if ((bStr[i] >= 65) && (bStr[i] <= 90)) {
// So we add 32 to make it lowercase
@ottodevs
ottodevs / pf.conf
Created May 11, 2017 22:32 — forked from trustin/pf.conf
Trustin's /etc/pf.conf for Mac OS X
# 1. Put this file to /etc/pf.conf
# 2. Install init boot scripts using IceFloor then - http://www.hanynet.com/icefloor/
# I tried to use IceFloor to configure everything but it didn't work very well.
# 3. Once done, you can confirm the rules were loaded with 'sudo pfctl -sr'
# 4. At System Preferences -> Security -> Firewall -> Firewall Options,
# check 'Block all incoming connections' to prevent annoying per-app dialogs.
set skip on lo0
set block-policy drop
@ottodevs
ottodevs / Collector.sol
Created October 23, 2019 08:13
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&gist=
pragma solidity ^0.4.8;
import "./Reentrance.sol";
contract Collector {
Reentrance public reentrance;
function Collector (address _reentrance) {
reentrance = Reentrance(_reentrance);
}
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmQNqWYeS3L3FnthWX19fxZJbdHKp7CfdJHmnFpjAw1VUK ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@ottodevs
ottodevs / Random-string
Created November 8, 2018 02:51 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@ottodevs
ottodevs / kubernetes_on_macOS.md
Created July 12, 2017 15:54 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

Keybase proof

I hereby claim:

  • I am ottodevs on github.
  • I am ottog (https://keybase.io/ottog) on keybase.
  • I have a public key whose fingerprint is 0347 4756 E0F2 C596 CF89 1B20 180F 5829 CAEF 69AB

To claim this, I am signing this object:

@ottodevs
ottodevs / Atom_export_settings.md
Created July 28, 2018 21:02 — forked from michalczukm/Atom_export_settings.md
Atom: Backup all settings

Export:

  1. Copy from ${user}/.atom:
  • config.cson
  • keymap.cson
  • snippets.cson
  • styles.less
  1. Save installed packages list apm list --installed --bare > packages.list
$('#leftbar').remove();
$('#price').css({
'font-size': '50px',
'height': '60px',
'line-height': '60px'
});