Skip to content

Instantly share code, notes, and snippets.

View phongsakornp's full-sized avatar
🎯
Focusing

Phongs phongsakornp

🎯
Focusing
View GitHub Profile
@phongsakornp
phongsakornp / list.md
Created December 1, 2023 04:52 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@phongsakornp
phongsakornp / package.json
Last active March 13, 2017 20:18
Electron package.json
{
"name": "DirectionalControl",
"version": "0.0.1",
"description": "Directional Control",
"main": "./main.js",
"scripts": {
"start-dev": "ENVIRONMENT=DEV electron .",
"start": "electron .",
"build": "webpack",
"watch": "webpack-dev-server --hot --inline --progress",
@phongsakornp
phongsakornp / webpack.config.js
Created March 13, 2017 20:14
Electron Webpack Config
const path = require('path')
const webpack = require('webpack')
const PATHS = {
app: path.join(__dirname, 'src/app/index'),
build: path.join(__dirname, 'build')
}
let options = {
target: 'electron',
# http://debugmode.net/2013/02/19/how-to-find-index-of-an-item-in-javascript-object-array/
var findIndexByKeyValue = function(arraytosearch, key, valuetosearch) {
for (var i = 0; i < arraytosearch.length; i++) {
if (arraytosearch[i][key] == valuetosearch) {
return i;
}
}
return null;
@phongsakornp
phongsakornp / CollectionView Batch Update
Last active July 10, 2024 00:17
#swift, `Reload CollectionView With Smooth Animation`
// Reload data with animation.
// http://stackoverflow.com/a/15165733
self.collectionView.performBatchUpdates(
{
self.collectionView.reloadSections(NSIndexSet(index: 0))
}, completion: { (finished:Bool) -> Void in
})
# Create Package
meteor create --package username:packagename
@phongsakornp
phongsakornp / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console