This file contains hidden or 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
say("Hello World"); |
This file contains hidden or 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
Advanced SQL | |
<https://www.slideshare.net/MarkusWinand/modern-sql?ref=https://modern-sql.com/slides> | |
slide 3: `LATERAL` | |
slide 12: `GROUPING SETS` | |
slide 19: `WITH` | |
slide 45: `WITH RECURSIVE` | |
slide 71: `FILTER` | |
slide 75: `PARTITION BY`, `OVER` (/`OVER ORDER BY`) | |
slide 105: `WITHIN GROUP` |
This file contains hidden or 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
[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. |
This file contains hidden or 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
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. |
This file contains hidden or 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
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?' | |
); |
This file contains hidden or 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
.global _start | |
.text | |
_start: | |
pushq %rbp | |
movq %rsp, %rbp | |
movabsq $str1, %rdi | |
movabsq $str2, %rsi | |
#movl $str2_size, %ecx |
This file contains hidden or 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
# models | |
class Models | |
constructor: (@db) -> | |
channel: (name) -> new Channel(@db, name) | |
# channel | |
class Channel | |
constructor: (@db) -> | |
This file contains hidden or 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
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; | |
} |
This file contains hidden or 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
// distinct names of the languages you have github repos in | |
// use it on github.com/NAME?tab=repositories | |
var xs = []; | |
Array.prototype.slice.call($$('.repo-list-stats')) | |
.map(function (x) { return x.innerHTML.split(/\s+/)[1] }) | |
.filter(function (x) { | |
if (~xs.indexOf(x) || x[0] == '<') return false; | |
xs.push(x); | |
return true; | |
}); |
This file contains hidden or 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
[ | |
{ | |
"name":"Greeks", | |
"gods": [ | |
{ | |
"name":"Zeus", | |
"excerpt": "Zeus is the god of weather, with lightning, thunder, rain, and thunderstorms attributed to him. Later he became associated with justice and the law." | |
}, | |
{ | |
"name":"Hades", |