Skip to content

Instantly share code, notes, and snippets.

Avatar

ven vendethiel

View GitHub Profile
View cl-condition-system.perl
class X::DivideByZero is Exception {}
class X::UnknownRestart is Exception {
has $.name;
method message { "Unknown restart: $.name" }
}
my %*BOUND;
sub restart-case(Code $code, *%handlers) {
View dupe-list.txt
dupe for Admin Upload Utility : 4238 and 7144 and 6988 and 4228 and 7092
dupe for Avatar Generator : 5006 and 6516
dupe for Azerbaijani Language Pack : 6790 and 7760
dupe for Blank Page Template : 1945 and 3562
dupe for Disable Registration : 3270 and 6147
dupe for Easy Online/Offline When Viewing Topic : 5464 and 5464
dupe for Gender Hack : 182 and 7692
dupe for Guestbook : 4597 and 7587
dupe for External Forum Redirect : 1810 and 1810
dupe for Photo Album Add-on : 1603 and 1719 and 1319 and 2356 and 1155 and 1352
@vendethiel
vendethiel / lb.js
Last active Mar 24, 2019 — forked from abrudz/lb.js
APL language bar
View lb.js
;(_=>{
let hc={'<':'&lt;','&':'&amp;',"'":'&apos;','"':'&quot;'},he=x=>x.replace(/[<&'"]/g,c=>hc[c]) //html chars and escape fn
,tcs='<-←xx×/\\×:-÷*O⍟[-⌹-]⌹OO○77⌈FF⌈ll⌊LL⌊|_⊥TT⊤-|⊣|-⊢=/≠L-≠<=≤<_≤>=≥>_≥==≡=_≡/_≢L=≢vv∨^^∧^~⍲v~⍱^|↑v|↓((⊂cc⊂(_⊆))⊃[|⌷|]⌷A|⍋V|⍒ii⍳i_⍸ee∊e_⍷'+
'uu∪UU∪nn∩/-⌿\\-⍀,-⍪rr⍴pp⍴O|⌽O-⊖O\\⍉::¨""¨~:⍨~"⍨*:⍣*"⍣oo∘o:⍤o"⍤[\'⍞\']⍞[]⎕[:⍠:]⍠[=⌸=]⌸[<⌺>]⌺o_⍎oT⍕o-⍕<>⋄on⍝->→aa⍺ww⍵VV∇--¯0~⍬'+
'^-∆^=⍙[?⍰?]⍰:V⍢∇"⍢||∥ox¤)_⊇_)⊇O:⍥O"⍥V~⍫\'\'`'
,lbs=['←←\nASSIGN',' ','++\nconjugate\nplus','--\nnegate\nminus','××\ndirection\ntimes','÷÷\nreciprocal\ndivide','**\nexponential\npower','⍟⍟\nnatural logarithm\nlogarithm',
'⌹⌹\nmatrix inverse\nmatrix divide','○○\npi times\ncircular','!!\nfactorial\nbinomial','??\nroll\ndeal',' ','||\nmagnitude\nresidue',
'⌈⌈\nceiling\nmaximum','⌊⌊\nfloor\nminimum','⊥⊥\ndecode','⊤⊤\nencode','⊣⊣\nsame\nleft','⊢⊢\nsame\nright',' ','==\nequal','≠≠\nnot equal',
'≤≤\nless than or equal to','<<\nless than','>>\ngreater than','≥≥\ngreater than or equal to','≡≡\ndepth\nmatch','≢≢\ntally\nnot matc
@vendethiel
vendethiel / main.p6
Created Oct 15, 2018 — forked from pmurias/main.p6
Hello World
View main.p6
say("Hello World");
View irclog-#livescript-2018-01-18.txt
[20:57:31] <Ven``> we have (potentially) a lot to discuss. Should we start by bikeshedding, discussing viable implementations, ..?
[20:59:05] <rhendric> Not sure those conversations are separable. Implementation should inform design at least somewhat. Maybe we should start with goals?
[20:59:20] <Ven``> OK, fair enough.
[20:59:37] <rhendric> As in, is this the beginning of an eventual full support of types in Flow and/or TypeScript format?
[20:59:46] <rhendric> Is this a stopgap measure to make things a little more usable?
[21:00:03] <rhendric> Something else or in between?
[21:00:24] <Ven``> Definitely full support. Though not necessarily in the very beginning.
[21:00:57] <Ven`> I don't mind if I don't get e.g. object types and class types in the early beginning.
[21:01:03] <Ven`> Inference itself would help alleviate that
[21:01:31] <rhendric> Ideally, yes.
@vendethiel
vendethiel / Commentated.scala
Last active May 26, 2020 — forked from SystemFw/Lib.scala
Shapeless: derive Slick's GetResult for arbitrary case classes
View Commentated.scala
import slick.jdbc.{GetResult, PositionedResult}
import scala.annotation.implicitNotFound
import scala.reflect.runtime.universe.TypeTag
/**
* A type class that allows the user of GenericGetResult to support their own type.
* This is mostly used to support `newtype`s (like wrappers around UUIDs).
*
* A user just has to use the helper to make the type known to GenericGetResult.
View gist:9573ef16cc45a353dc626ef68432e28a
CREATE TABLE `phpbb_notifications` (
notification_id INT NOT NULL AUTO_INCREMENT,
notification_type INT NOT NULL,
notification_user_id INT NOT NULL COMMENT 'user id receiving notification',
notification_date DATE COMMENT 'when happened the notification',
notification_data TEXT COMMENT 'JSON of the data (title of post, or whatever)',
notification_trigger_user INT COMMENT '(May be) the user who triggered the notification',
notification_read TINYINT COMMENT 'Was the notification read?'
);
View rekt.s
.global _start
.text
_start:
pushq %rbp
movq %rsp, %rbp
movabsq $str1, %rdi
movabsq $str2, %rsi
#movl $str2_size, %ecx
View gist:5087bbd98814e2eaff9b
# models
class Models
constructor: (@db) ->
channel: (name) -> new Channel(@db, name)
# channel
class Channel
constructor: (@db) ->
View saturday-night-no-beer.pl6
my @a = ('99 bottles', 'take one down', '98 bottles');
for @a {
say "$^a of beer on the wall, $^a of beer.$^b, $^c of beer on the wall.".tc;
}
my @b = ('99 bottles', 'take one down', '98 bottles'), ('98 bottles', 'take one down', '97 bottles');
say @b.perl;
for @b {
say "$^a of beer on the wall, $^a of beer.$^b, $^c of beer on the wall.".tc;
}
You can’t perform that action at this time.