Skip to content

Instantly share code, notes, and snippets.

View rainstormza's full-sized avatar

Supakorn Thongtra rainstormza

View GitHub Profile
// Copy paste this script on your console
var disabled = false;
var r = confirm('Start the Autolike on this page?');
var min_time_to_decide = 300;
var max_additional_time_to_decide = 1000;
var time_to_decide = function() {
additional_time_to_decide = Math.floor(Math.random() * max_additional_time_to_decide);
return min_time_to_decide + additional_time_to_decide;
@pixelthing
pixelthing / iphonex-8-portrait.txt
Last active December 3, 2018 20:43
iPhone 6/7/8/X viewport sizes and 100vh - portrait
╔══════════════╦═══════════╦═══════════╦═══════════════╦══════╗
║ Portrait ║ Window ║ Document ║ UI Chrome ║ ║
╠══════════════╬═════╦═════╬═════╦═════╬════╦════╦═════╣100vh ║
║ ║ X ║ Y ║ X ║ Y ║top ║bot ║ all ║ ║
╠══════════════╬═════╬═════╬═════╬═════╬════╬════╬═════╬══════╣
║ 8 full UI ║375px║667px║375px║553px║70px║45px║115px║-75px ║
║ 8 scrolled ║375px║667px║375px║627px║40px║0px ║40px ║ yes ║
╠══════════════╬═════╬═════╬═════╬═════╬════╬════╬═════╬══════╣
║ 8+ full UI ║414px║736px║414px║621px║70px║45px║115px║-75px ║
║ 8+ scrolled ║414px║736px║414px║696px║40px║0px ║40px ║ yes ║
@hygull
hygull / LICENSE KEY FOR SUBLIME TEXT 3 BUILD 3143.md
Last active June 7, 2026 15:12
LICENSE KEY FOR SUBLIME TEXT 3 BUILD 3143

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@345161974
345161974 / GoMgoSample-1.go
Created June 12, 2017 06:27 — forked from ardan-bkennedy/GoMgoSample-1.go
Sample Go and MGO example
type (
// BuoyCondition contains information for an individual station.
BuoyCondition struct {
WindSpeed float64 `bson:"wind_speed_milehour"`
WindDirection int `bson:"wind_direction_degnorth"`
WindGust float64 `bson:"gust_wind_speed_milehour"`
}
// BuoyLocation contains the buoy's location.
BuoyLocation struct {
@primaryobjects
primaryobjects / css-comparison.csv
Last active April 11, 2025 19:11
A comparison of CSS library sizes.
Name Version Size (uncompressed) Size (minified) Size (gzipped) URL
Bootstrap v3.3.7 143 KB 117 KB 20 KB http://getbootstrap.com/css/
Bootstrap v4.0.0 187 KB 147 KB 20 KB https://v4-alpha.getbootstrap.com/
Materialize v3.0 114 KB 90 KB 18 KB http://materializecss.com/
Material Design Lite v1.3.0 350 KB 137 KB 21 KB https://getmdl.io/
mini.css v2.1 47 KB 36 KB 7 KB https://chalarangelo.github.io/mini.css/
Semantic UI v2.2.6 730 KB 550 KB 95 KB https://semantic-ui.com/
Foundation v3.0 90 KB 64 KB 12 KB http://foundation.zurb.com/
Pure CSS v0.6.2 80 KB 17 KB 3.8 KB https://purecss.io/
Picnic CSS v6.3.2 55 KB 38 KB 7 KB https://picnicss.com
@lourd
lourd / firebaseChannel.test.js
Last active September 19, 2018 03:56
Example of making a channel in redux-saga with a firebase source and testing it with jest
import { eventChannel } from 'redux-saga'
function firebaseChannel(firebase, {
eventType = 'value',
returnSnapshot = false,
} = {}) {
return eventChannel(emit => {
const subscription = firebase.on(eventType, snapshot => {
emit(returnSnapshot ? { snapshot } : { value: snapshot.val() })
})
@dabit3
dabit3 / configureStore.js
Created February 18, 2017 22:02
Medium - redux4ways - Redux Saga configureStore.js
import { createStore, applyMiddleware } from 'redux'
import app from './reducers'
import createSagaMiddleware from 'redux-saga'
import dataSaga from './saga'
const sagaMiddleware = createSagaMiddleware()
export default function configureStore() {
const store = createStore(app, applyMiddleware(sagaMiddleware))
@paulsturgess
paulsturgess / service.js
Last active March 15, 2026 18:46
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}
@tomconte
tomconte / web3-solc-contract-compile-deploy.js
Created December 13, 2016 09:32
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@mattstabeler
mattstabeler / iframe-resizer.ts
Last active August 21, 2018 17:46
iFrame resizer (consumer) for angular 2
// add this directive to an iFrame element and pass a name of the source, and this will change the height based on the
// events passed from the iframe source. the name of the source, and type of the message are checked before making a
// change to the element width.
// expects an object like to have been sent through the window.postMessage() interface :
// {
// type: 'resize',
// source: 'some-iframe-content',
// value: {
// height: 200