Skip to content

Instantly share code, notes, and snippets.

View AlexKMDev's full-sized avatar

Alex AlexKMDev

View GitHub Profile
@AlexKMDev
AlexKMDev / guide.md
Created December 5, 2018 19:37
Sign Macos apps with self-signed certificate
  1. Create certificate in Keychain: Certificate Assistant -> Create a Certificate
  2. codesign -s -fv /Applications/
@AlexKMDev
AlexKMDev / script.sh
Created February 21, 2017 17:40
Carthage Build Phase
for framework in $(find $SRCROOT/Carthage/Build/iOS/ -name "*.framework"); do
SCRIPT_INPUT_FILE_0=$framework SCRIPT_INPUT_FILE_COUNT=1 carthage copy-frameworks
done
Dyld Error Message:
Symbol not found: _mkostemp
Referenced from: /usr/local/lib/libfontconfig.1.dylib
Expected in: /usr/lib/libSystem.B.dylib
@AlexKMDev
AlexKMDev / GoSublime.sublime-settings
Created May 18, 2016 15:23
GoSublime configuration
{
"env": {"GOPATH": "$HOME/go", "PATH": "$GOPATH/bin:/usr/local/opt/go/libexec/bin:$PATH"},
"fmt_tab_width": 4,
}
@AlexKMDev
AlexKMDev / bcmwl-kernel-source.sh
Last active August 29, 2015 14:27
install broadcom proprietary wi-fi drivers on fresh Ubuntu installation without ethernet connection using chroot in livecd environment
# in livecd
mount /dev/sda2 /target # mount root filesystem
mount -t proc proc /target/proc/
mount -t sysfs sys /target/sys/
mount -o bind /dev /target/dev/
chroot /target
# in chroot
echo "nameserver 8.8.8.8" > /etc/resolv.conf
apt-get update
apt-get install bcmwl-kernel-source
@AlexKMDev
AlexKMDev / install.sh
Last active November 12, 2018 06:30
homebrew nginx http/2
brew install nginx --devel --with-http2
# or
brew install https://gist.githubusercontent.com/Anakros/1891d0b4ec3ca2e34d97/raw/1d75c84f784845047aa7fb52b06becf9c1350da4/nginx.rb --with-http2 --devel
#!/bin/sh
if [ -z "$3" ]
then
echo "usage: $0 background.png lgbt.svg output.png"
exit 1
fi
bg_size=$(identify -format '%wx%h' "$1")
convert -resize $bg_size\! $2 -density 1200 -alpha set -channel A -evaluate set 40% $2.png
convert -composite "$1" "$2.png" -geometry $bg_size+0+0 -depth 8 "$3"
#!/usr/bin/env ruby
require 'em-http-request'
require 'json'
def send_m(m, recipient)
token = ''
base = 'https://api.telegram.org/bot'
uri = "#{base}#{token}/sendMessage"
@AlexKMDev
AlexKMDev / base64tobin.rb
Created May 28, 2015 10:48
convert base64-encoded png to binary
require 'base64'
unless ARGV.first.nil?
file = File.new ARGV.first, 'r'
encoded = file.gets
decoded = Base64.decode64 encoded
file.close
output = File.new "#{ARGV.first}.png", 'w'
@AlexKMDev
AlexKMDev / keybase.md
Created January 9, 2015 13:54
keybase proof

Keybase proof

I hereby claim:

  • I am anakros on github.
  • I am anakros (https://keybase.io/anakros) on keybase.
  • I have a public key whose fingerprint is 7703 AD78 D008 E9FC 6F1F 4B06 5178 FA7B 12B3 9C0B

To claim this, I am signing this object: