❯ git clone https://github.com/oxygine/oxygine-framework oxygine
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 React from 'react' | |
export const useEventCallback = <T extends (...args: any[]) => any>( | |
callback: T, | |
dependencies: React.DependencyList, | |
) => { | |
const ref = React.useRef(() => { | |
throw new Error('Cannot call an event handler while rendering.') | |
}) |
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
Cihai Foundation Software Grant and Corporate Contributor License Agreement | |
("Agreement"), v1.0 | |
You accept and agree to the following terms and conditions for Your present and | |
future Contributions submitted to Cihai Software Foundation. ("Cihai"). Except | |
for the license granted herein to Cihai and recipients of software distributed | |
by Cihai, You reserve all right, title, and interest in and to Your | |
Contributions. | |
1. Definitions. |
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
Cihai Software Foundation Individual Contributor License Agreement | |
("Agreement"), v1.0 | |
You accept and agree to the following terms and conditions for Your present and | |
future Contributions submitted to Cihai Software Foundation. ("Cihai"). Except | |
for the license granted herein to Cihai and recipients of software distributed | |
by Cihai, You reserve all right, title, and interest in and to Your | |
Contributions. | |
1. Definitions. |
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
def drop_into_pdb(app, exception): | |
import sys | |
import pdb | |
import traceback | |
traceback.print_exc() | |
pdb.post_mortem(sys.exc_info()[2]) | |
# somewhere in your code (probably if DEBUG is True) | |
flask.got_request_exception.connect(drop_into_pdb) |
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
// Single side border-radius | |
@mixin border-radius($radius: $border-radius) { | |
@if $enable-rounded { | |
border-radius: $radius; | |
} | |
} | |
@mixin border-top-radius($radius) { | |
@if $enable-rounded { |
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/env python | |
# -*- coding: utf8 -*- | |
""" | |
Based off http://frictionlessdata.io/guides/creating-tabular-data-packages-in-python/ | |
For use on https://github.com/cihai/unihan-tabular | |
License: MIT | |
""" | |
from __future__ import (absolute_import, division, print_function, |
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> | |
// run: clang -S hi2.c | |
int main(){ | |
printf("HI"); | |
} |
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
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
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
# -*- coding: utf-8 -*- | |
"""Proof of concept to use saltstack's pure modules and states with fabric:: | |
fab list_packages print_specs -H <ip> --user=<user> | |
On my vagrant environment: | |
fab list_packages print_specs -H <ip> --password=vagrant --user=vagrant | |
""" |