Skip to content

Instantly share code, notes, and snippets.

View 2category.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
import Control.Category
import Prelude hiding ((.), id, fst, snd)
newtype Id x = Id { unId :: x }
newtype (.) f g x = Compose { unCompose :: f (g x) }
newtype (~>) a b x = ExpF { unExpF :: a x -> b x }
@Discord-AppBot
Discord-AppBot / answer.md
Created Oct 14, 2020
AppBot - a Discord bot made for staff application management within Discord.
View answer.md

How would your character act around others ? Give us a bit of personality.

Some would assume him to be the “silent but deadly” sort. Behind the helm, Oddox is constantly watchful of his surroundings.  He is quick-witted, regimented, observant and tactful in everything he does in his life. He is not one to waste his breath on those he deems unintelligent. When he speaks, he does so succinctly and sometimes can come off as brash. He has a dark sense of humor to help cope with the things he did whilst in the Death Watch. He considers himself an elite breed of Mandalorian because he was raised upon traditionalist ideals. He is a very methodical battle strategist and will not shy away from using brute force if necessary to get what he wants. While he is more reserved, he can unhinge in battle and some would consider his style of combat dishonorable. He will see a  job through to the end dutifully nonetheless. He does not lack empathy, of course. His actions quietly haunt him over the years and more recently

@kazak1377
kazak1377 / nuxt-asyncData-mergeStrategy.js
Created Oct 14, 2020
Execute nuxt's mixin asyncData BEFORE component's one.
View nuxt-asyncData-mergeStrategy.js
Vue.config.optionMergeStrategies.asyncData = (to, from) => (...args) => {
return async function() {
to && await to(...args);
from && await from(...args);
}()
}
@awilsongithub
awilsongithub / input.scss
Created Oct 14, 2020
Generated by SassMeister.com.
View input.scss
/* ========== VARIABLES ========= */
$colors: (
primary: #005dff,
accent: #FFF6BB
);
$primaryColor: lightblue;
$backgroundColor: #EBECF0;
$borderRadius: 4px;
View button.jsx
<Button color="warning" onClick={() => {
const { speakers } = apolloClient.cache.readQuery({ query: GET_SPEAKERS });
apolloClient.cache.writeQuery({
query: GET_SPEAKERS,
data: {
speakers: {
datalist: [...speakers.datalist].sort((a,b) => a.id - b.id)
},
},
@rafaelramoss
rafaelramoss / .eslintrc.js
Created Oct 14, 2020
My current config in ESLint TypeScript
View .eslintrc.js
module.exports = {
env: {
browser: true, //depende
es2021: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
'prettier',
'prettier/react',
View Package%20Control.sublime-settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"10% Too Dull for My Tastes Color Scheme",
"1337 Color Scheme",
"A File Icon",
@daniel11delamo
daniel11delamo / PY0101EN-2-2-Lists.ipynb
Created Oct 14, 2020
Created on Skills Network Labs
View PY0101EN-2-2-Lists.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pauseMongoSnippet.java
private void pauseAndPoll(){
java.io.File tmpFile = new java.io.File("/tmp/pause.touch");
long lastModified = 0; long newModified = 0;
if (tmpFile.exists()) lastModified = tmpFile.lastModified();
do {
System.out.println("waiting .... touch /tmp/pause.touch");
try {Thread.sleep(3 * 1000);/*3secs*/ } catch(Exception e){}
if (tmpFile.exists()) newModified = tmpFile.lastModified();
} while (newModified == lastModified);
}
@pkellner
pkellner / button.html
Created Oct 14, 2020
Button Click To Sort GraphQL Cache
View button.html
<Button color="warning" onClick={() => {
const { speakers } = apolloClient.cache.readQuery({ query: GET_SPEAKERS });
apolloClient.cache.writeQuery({
query: GET_SPEAKERS,
data: {
speakers: {
datalist: [...speakers.datalist].sort((a,b) => a.id - b.id)
},
},
});
You can’t perform that action at this time.