Skip to content

Instantly share code, notes, and snippets.

View zealws's full-sized avatar

Zeal Wierslee zealws

View GitHub Profile
@zealws
zealws / gist:630a76c869438367def2
Created August 28, 2014 16:44
bf - hello world
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
@zealws
zealws / gist:4c8351a3f3361dd4b317
Last active August 29, 2015 14:06
arch linux cross-mipsel-linux-gnu-gcc compile failure
g++ -c -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../.././gcc/../include -I../.././gcc/../libcpp/include -D_FORTIFY_SOURCE=2 \
-o build/genmddeps.o ../.././gcc/genmddeps.c
{standard input}: Assembler messages:
{standard input}:11: Error: unrecognized opcode `pushq %rbx'
{standard input}:14: Error: unrecognized opcode `movq %rdi,%rbx'
{standard input}:15: Error: unrecognized opcode `movl $16,%edi'
{standard input}:16: Error: unrecognized opcode `call xmalloc'
{standard input}:17: Error: unrecognized opcode `movq _ZL4last(%rip),%rdx'
{standard input}:18: Error: unrecognized opcode `movq %rbx,8(%rax)'
{standard input}:19: Error: unrecognized
@zealws
zealws / gist:c71056b6051ac890e776
Last active August 29, 2015 14:11
rest-framework 3.0 top-down serialization

Old serializers.py:

class ASerializer(serializers.Serializer):
    f1 = serializers.IntegerField(default=0)
    f2 = serializers.IntegerField(default=1)
    
    def restore_object(self, attrs, instance=None):
        return A(**attrs)
#!/usr/bin/env bash
profiles=$(netctl list | grep "^*" | awk '{print $2}')
for x in ${profiles} ; do
netctl status $x
echo ; echo
done
@chantra @zfjagann @asanyal902 still facing problem down is complete network setup. Ty for ur support and reply
![setup](https://cloud.githubusercontent.com/assets/11455759/7522074/6c1cb88c-f510-11e4-8d11-61b26414932f.png)
iptables entry
# Generated by iptables-save v1.4.21 on Thu May 7 22:56:57 2015
*nat
:sudo iptables -t nat -P PREROUTING ACCEPT [13:2526]
sudo iptables -t nat -P INPUT ACCEPT
@zealws
zealws / gist:9e747e6574808e854483
Created May 27, 2015 17:17
random cowsay + lolcat
fortune | cowsay -f $(cowsay -l | tail -n +2 | tr ' ' '\n' | sort -R | head -n1) | lolcat
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': '/var/log/django.atcui.log',
},
},
ATCD_WAN=eth0
ATCD_LAN=eth1
import math, copy, time as _time
ingredients = "ingredients"
time = "time"
produces = "produces"
rate = "rate"
total = "total"
feeds = "feeds"
leaf = "leaf"
bldgs = "buildings"
@zealws
zealws / gist:f1395880b1a00a24a002
Created November 14, 2015 22:11
knife-solo output pacman --needed
DEBUG: Running processed command sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm
DEBUG: sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm stdout:
DEBUG: sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm stdout: :: Synchronizing package databases...
DEBUG: sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm stdout: core is up to date
DEBUG: sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm stdout: extra is up to date
DEBUG: sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm stdout: community is up to date
DEBUG: sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm stdout: warning: ruby-2.2.3-1 is up to date -- skipping
DEBUG: sudo -E -p 'knife sudo password: ' pacman --needed -Sy ruby rsync make gcc --noconfirm stdout: warning: make-4.1-1 is up to date --