Skip to content

Instantly share code, notes, and snippets.

Avatar
🖥️
Meandering through cyberspace

Morten Linderud Foxboron

🖥️
Meandering through cyberspace
View GitHub Profile
View shell.bash
λ fzf » export CGO_LDFLAGS="-Wl,-z,relro,-z,now"
λ fzf » export CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2"
λ fzf » export GOFLAGS="-trimpath -ldflags=-linkmode=external"
λ fzf » CGO_ENABLED=1 go build -buildmode=pie -o fzf
^ - No File!
# github.com/junegunn/fzf
@Foxboron
Foxboron / monthly.md
Created Dec 8, 2017
Arch Monthly November
View monthly.md

Arch monthly November

This is the third edition of Arch monthly!

New TU Andrew Crerar

Andrew Crerar applied to become a Trusted User and was accepted! Congratulations! His intentions is to move firefox-develop from the AUR to [community]

Links:

View gist:fb65ff748019c0f12f89
### Keybase proof
I hereby claim:
* I am Foxboron on github.
* I am fox (https://keybase.io/fox) on keybase.
* I have a public key whose fingerprint is C100 3466 7663 4E80 C940 FB9E 9C02 FF41 9FEC BE16
To claim this, I am signing this object:
View Hylang blog posts
By hylang core devs:
Defining Function Arguments in Hy
http://agentultra.com/2013/04/22/defining-function-arguments-in-hy/
Hy a Lisp on Python
http://agentultra.com/2013/04/19/hy-a-lisp-on-python/
Programming Can Be Fun with Hy
http://www.opensourceforu.com/2014/02/programming-can-fun-hy/
@Foxboron
Foxboron / hylang-source
Last active Nov 27, 2016
Hylang sources
View hylang-source
Lightning talk on PyCon 2013:
http://www.youtube.com/watch?feature=player_detailpage&v=1vui-LupKJI#t=975
Boston Python Meetup (January 2013)
http://www.youtube.com/watch?v=ulekCWvDFVI
PyCon Canada 2013
http://www.youtube.com/watch?v=n8i2f6X0SkU
PyCon France 2013
View gist:10675553
### Keybase proof
I hereby claim:
* I am Foxboron on github.
* I am fox (https://keybase.io/fox) on keybase.
* I have a public key whose fingerprint is CDC1 F0D2 CE5F BB1D 8FC5 A660 7B00 1AE2 70CF B413
To claim this, I am signing this object:
View gist:9301850
'''
Define functions inside functions,
recompile the correct function matching the
arg count and hand it back.
'''
from types import FunctionType
class Multi(object):
def __init__(self, fn):
View gist:6643154
#Python2
import sys
f = lambda x: map(lambda i: sys.stdout.write(([str(i)+'\n',"Fizz\n"],["Buzz\n","FizzBuzz\n"])[not i % 3][not i % 5]), range(0,x)) and None
## Python3
f = lambda x: list(map(lambda i: print(([str(i),"Fizz"],["Buzz","FizzBuzz"])[not i % 3][not i % 5]), range(0,x))) and None
View gist:5521458
# F=(9/5) * C +32
def convert():
c = int(raw_input('Enter celcius to convert: '))
convertedC = (9/5.0) * c + 32
print convertedC
while True:
View Bot modules.txt
Modules:
- git module (clone etc)
- nginx module (make config for site, restart etc)
- file module (execute file, download file etc)
- user module (get information about vps user etc)
- server module (launch custom bash commands from files)
Auth system:
- Specify admins in config file
- Add new users with priviliges in sqlite file