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 <iostream> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_mixer.h> | |
#include <SDL2/SDL_image.h> | |
using namespace std; | |
SDL_Texture* LoadTexture(SDL_Renderer* render, const char* name); | |
bool processInput(bool b[4]); |
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
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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
# i3status configuration file. | |
# see "man i3status" for documentation. | |
# It is important that this file is edited as UTF-8. | |
# The following line should contain a sharp s: | |
# ß | |
# If the above line is not correctly displayed, fix your editor first! | |
general { | |
output_format = "i3bar" |
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
#!/bin/bash | |
scrot /tmp/screen_locked.png | |
# convert /tmp/screen_locked.png -blur 0x6 /tmp/screen_locked.png | |
# convert /tmp/screen_locked.png -charcoal 5 /tmp/screen_locked.png | |
convert /tmp/screen_locked.png -blur 0x6 /tmp/screen_locked.png | |
i3lock -i /tmp/screen_locked.png | |
# Turn the screen off after a delay. | |
sleep 60; pgrep i3lock && xset dpms force off |
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
sleepy(micah). | |
sleepy(john). | |
dumb(micah). | |
retiring(radle). | |
has_micah(X) :- | |
%% Find a predicate of arity 1 | |
current_predicate(X/1), | |
%% "Call" that predicate with micah | |
call(X, micah). |
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
"use strict"; | |
import ReactDOM from 'react-dom'; | |
import React from 'react'; | |
class App extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = {stateVal: 0}; | |
} |
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
// Ignore these imports | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
// Usage: | |
// 1. render a Popup anywhere in the app. | |
// 2. pass trigger and content props | |
// - trigger is the clickable element which shows/hides the content | |
// 3. register a global onClick listener **once** that calls Popup.hidePopups. |
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
import * as sinon from "sinon"; | |
import { Observable } from "../../lib/Rx"; | |
export function doNothing<T>(): T { | |
const handler = { | |
get(target, name) { | |
return () => {}; | |
}, | |
}; | |
return new Proxy({}, handler); |
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
package main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"log" | |
"time" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" |
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
export function broken1(callback: (x: any) => void, value1: string) { | |
return callback(() => console.log(value1)) | |
} | |
export function broken2(callback: any, value2: string) { | |
return callback(() => console.log(value2)) | |
} | |
export function working(callback: (x: () => void) => void, value3: string) { | |
return callback(() => console.log(value3)) |
OlderNewer