Skip to content

Instantly share code, notes, and snippets.

View vilvadot's full-sized avatar
🤘
-

Vilva. vilvadot

🤘
-
View GitHub Profile
@rohmanhm
rohmanhm / puppeteer.d.ts
Last active February 7, 2023 12:10
Puppeteer Definition Types for Typescript
declare module 'puppeteer' {
export interface ConnectOptions {
browserWSEndpoint?: string
// a browser websocket endpoint to connect to
ignoreHTTPSErrors?: boolean
// Whether to ignore HTTPS errors during navigation. Defaults to `false`
}
export interface LaunchOptions {
ignoreHTTPSErrors?: boolean
@mirague
mirague / CustomComponent-test.js
Last active November 9, 2021 09:32
Testing React-Intl components with Enzyme's mount() and shallow() methods. This is a helper function which wraps the `intl` context around your component tests in an easy and efficient way.
import { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js';
const wrapper = mountWithIntl(
<CustomComponent />
);
expect(wrapper.state('foo')).to.equal('bar'); // OK
expect(wrapper.text()).to.equal('Hello World!'); // OK

Intercom user_hash

Remember that your secret key should never be exposed to the public

  • So Javascript code below should only be used for testing unless modified and used to run on a server
@cdevroe
cdevroe / gist:4fb3ebf7806b39020c33
Created May 28, 2015 14:17
Open Visual Studio Code from Terminal
code () {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code" -n
else
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}"
open -a "Visual Studio Code" -n --args "$F"
fi
}
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@mbreit
mbreit / font-awesome.css.sass
Last active March 29, 2021 04:52
Using Font Awesome with SASS and mixins for adding icons to semantic HTML
$fontawesome_path: "." !default
@font-face
font-family: 'FontAwesome'
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot')
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot?#iefix') format("embedded-opentype"), font-url('#{$fontawesome_path}/fontawesome-webfont.woff') format("woff"), font-url('#{$fontawesome_path}/fontawesome-webfont.ttf') format("truetype")
font-weight: normal
font-style: normal
@mixin icon($icon)
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation