View gist:f611b31bd5b833340aeb95c29c0f4308
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-antigen-parse-args () { | |
local spec="$1" | |
shift | |
spec="$(echo "$spec" | tr '\n' ' ' | sed 's/[[:space:]]//g')" | |
local code='' | |
--add-var () { | |
test -z "$code" || code="$code\n" | |
code="${code}local $1='$2'" | |
} | |
local positional_args="$(echo "$spec" | cut -d\; -f1)" |
View antigen.zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-antigen-parse-args () { | |
576 # An argument parsing functionality to parse arguments the *antigen* way :). | |
577 # Takes one first argument (called spec), which dictates how to parse and | |
578 # the rest of the arguments are parsed. Outputs a piece of valid shell code | |
579 # that can be passed to `eval` inside a function which creates the arguments | |
580 # and their values as local variables. Suggested use is to set the defaults | |
581 # to all arguments first and then eval the output of this function. | |
582 | |
583 # Spec: Only long argument supported. No support for parsing short options. | |
584 # The spec must have two sections, separated by a `;`. |
View aidan.assm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; ThinkingTask2.asm | |
; | |
; Created: 8/08/2018 12:41:57 PM | |
; Author : APIUM | |
;[pppp | |
; Define here the variables | |
.def inputval = r16 | |
.def outputval = r17 |
View tableSearch.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; tableSearch.asm | |
; | |
; Created: 21/07/2018 6:49:15 PM | |
; Author : Glenn Matthews | |
; | |
; Define here the variables | |
.def temp =r16 | |
.def small =r17 |
View gist:5eef09edcd34dac090e2ca63b2b8e39c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct card { | |
char suit[10]; | |
int value; | |
} card; | |
// hearts, clubs, spades, diamonds |
View error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x6f37fa83, isOwner false, <3f72fc6, 609a0a57>[count 0, qsz 0, owner <NULL>]]] | |
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326) | |
at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297) | |
at java.lang.Thread.run(Thread.java:745) | |
Caused by: com.jogamp.opengl.GLException: AWT-EventQueue-0-SharedResourceRunner: Error making temp context(1) current: display 0x7f40800ebe30, context 0x7f40801d4fc0, drawable X11OnscreenGLXDrawable[Realized true, | |
Factory jogamp.opengl.x11.glx.X11GLXDrawableFactory@13194b59, | |
Handle 0x2400002, | |
Surface WrappedSurface[ displayHandle 0x7f40800ebe30 | |
, surfaceHandle 0x2400002 | |
, size 64x64 |
View gist:d7c6555e8aa0cb45fe51cdcbb62c1761
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPT6XKozeOYQB2HElFl6Wiw1HPloU/FhMlKif1zF/xeiWqfAaF/MCATggCwGusjNWRqiczldrO9jDjNWgY5Vq1ZtRLOX28hq72sUmLPGlnnKysE21J5xBcTgYEEzGr7tPdHxGS1LbU35AmTPnoeVJZ5KfYk2fjqgTZK4WnmBQ6VPTPiDoG093Dm3JbGaVlEorNE44lVmLbdbvbCs2Pb08xarcNoftVzKirYpeCo9gXyFCvETR08sT2wDW7FzkyotRo6nPfTrQQftpDdn3Fj1UD5nfK08f3nSBCEQwxvoXmClzgrvf/nc+SrIbLkmm2K0ZVd1f4s9755AOVgqiRxmoh apium@slegestor |
View gist:ca1fa9e5dbbccb2a99de26e85d1cbfd0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Daily Programmer 303 | |
hwv = input("Please enter h, w and v seperated by space > ").split(' ') | |
height,width,velocity = int(hwv[0]),int(hwv[1]),int(hwv[2]) | |
position = [0,height] | |
moves = 0 | |
bounces = 0 |
View dailyProgrammer-254-atbashCipher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plain = list('abcdefghijklmnopqrstuvwxyz .!@#$%^&*()_+|~,/<>?~|\'\:\=1234567890') | |
cipher = list('ZYXWVUTSRQPONMLKJIHGFEDCBA .!@#$%^&*()_+|~,/<>?~|\'\:\=1234567890') | |
answer = [] | |
atBash = input('What do you want to encode? => ').lower() | |
for i in atBash: | |
index = plain.index(i) | |
answer.append(cipher[int(index)]) |
View 277withPrint.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
# Reddit Daily Programming Challenge 277 - Fake Coins | |
# The challenge input | |
challenge = """abcd efgh equal | |
abci efjk left | |
abij efgl equal | |
mnopqrs tuvwxyz equal""" | |
# Global variables |
NewerOlder