Skip to content

Instantly share code, notes, and snippets.

;; Font Ligatures
(defun my-correct-symbol-bounds (pretty-alist)
"Prepend a TAB character to each symbol in this alist,
this way compose-region called by prettify-symbols-mode
will use the correct width of the symbols
instead of the width measured by char-width."
(mapcar (lambda (el)
(setcdr el (string ?\t (cdr el)))
el)
pretty-alist))
@Deiru2k
Deiru2k / index.d.ts
Created April 27, 2018 17:13
dadata-suggestions typings for TS
// For Own Project
interface CommonParams {
query: string,
count?: number,
}
interface FIOParams extends CommonParams {
parts?: 'NAME' | 'SURNAME' | 'PATRONYMIC',
gender?: 'MALE' | 'FEMALE' | 'UNKNOWN',
tsconfig.json
package.json
src/
components/
Output/
Output.tsx
root.tsx
@Deiru2k
Deiru2k / fetcher.tsx
Created October 6, 2017 15:55
GENERICS, BRUH.
import * as React from 'react';
import * as Bluebird from 'bluebird';
import * as superagent from 'superagent';
type dataMapFN<T> = (originalData: any) => T;
type combineDataFN<T> = (oldData: T, newData: any) => T;
export interface FetcherPropGeneric<T> {
data?: T,
isLoading: boolean,
<div>
{'wew lad'.split(' ').map(e => e === 'lad' ? <span>{e}&nbsp;</span> : `${e} `)}
</div>
<div>
<input [(ngModel)]="value" />
<button type="button" (click)="addValue(value)">Add</button>
</div>

TWITCH

  • Add and remove things that are Twitch.tv related.
  • Notes: To add game filters and title filters, you MUST include the brackets. Do NOT use the full Twitch URL. It will not work!! Use only the channel name (www.twitch.tv/channelName) The Team name must be from the URL, not the display name of the team. (www.twitch.tv/team/teamName) You may add multiple channels, teams, games, communities, game and title filters by using the pipe character | between them. The only required options are: channelName/communityName/teamName/gameName

Twitch Channels

@Deiru2k
Deiru2k / Root.jsx
Created August 26, 2016 15:03
Footer / Header
import React from 'react';
import MyFooter from 'components/MyFooter';
export default ({ children }) => (
<section>
{this.props.children}
<MyFooter />
</section>
)
// Place your settings in this file to overwrite the default settings
{
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"files.trimTrailingWhitespace": true,
"editor.rulers": [100]
}
class Login extends Component {
constructor() {
super();
this.changeField = this.changeField.bind(this);
this.login = this.login.bind(this);
this.state = {
login: ``,
password: ``,