Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jinpark on github.
  • I am jinpark (https://keybase.io/jinpark) on keybase.
  • I have a public key ASCpsqgNuntA4CEL7QGGm1vG_tPEZMbz9KHX-vVeoPagRAo

To claim this, I am signing this object:

var browserPrefixes = ['moz', 'ms', 'o', 'webkit'],
isVisible = true; // internal flag, defaults to true
// get the correct attribute name
function getHiddenPropertyName(prefix) {
return (prefix ? prefix + 'Hidden' : 'hidden');
}
// get the correct event name
function getVisibilityEvent(prefix) {
@jinpark
jinpark / 61-sensor-local.hwdb
Created December 14, 2019 14:49
accel_mount_matrix for acer spin 1 sp111-33 to fix orientation / accelerometer issues for elementary os
sensor:modalias:acpi:BOSC0200*:dmi:*svn*Acer*:*pn*Spin*SP111-33*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
@jinpark
jinpark / cloudflare_update.script
Created March 30, 2019 00:53 — forked from viritt/cloudflare_update.script
Automatic script for Mikrotik RouterOS updating record on CloudFlare.
#########################################################################
# ================================================== #
# $ Mikrotik RouterOS update script for CloudFlare $ #
# ================================================== #
# #
# - You need a CloudFlare account & api key (look under settings), #
# a zone and A record in it #
# - All variables in first section are obvious, except CFid, #
# To obtain CFzoneid use following command in any unix shell: #
# curl -X GET "https://api.cloudflare.com/client/v4/accounts" -H "X-Auth-Email: YOUR_EMAIL" -H "X-Auth-Key: YOUR_API_KEY" -H "Content-Type: application/json" | python -mjson.tool
@jinpark
jinpark / pokemonnames.py
Created July 21, 2016 05:48
pokemon_names.py
names = ['bulbasaur','ivysaur','venusaur','charmander','charmeleon','charizard','squirtle','wartortle','blastoise','caterpie','metapod','butterfree','weedle','kakuna','beedrill','pidgey','pidgeotto','pidgeot','rattata','raticate','spearow','fearow','ekans','arbok','pikachu','raichu','sandshrew','sandslash','nidoran-f','nidorina','nidoqueen','nidoran-m','nidorino','nidoking','clefairy','clefable','vulpix','ninetales','jigglypuff','wigglytuff','zubat','golbat','oddish','gloom','vileplume','paras','parasect','venonat','venomoth','diglett','dugtrio','meowth','persian','psyduck','golduck','mankey','primeape','growlithe','arcanine','poliwag','poliwhirl','poliwrath','abra','kadabra','alakazam','machop','machoke','machamp','bellsprout','weepinbell','victreebel','tentacool','tentacruel','geodude','graveler','golem','ponyta','rapidash','slowpoke','slowbro','magnemite','magneton','farfetchd','doduo','dodrio','seel','dewgong','grimer','muk','shellder','cloyster','gastly','haunter','gengar','onix','drowzee','hypno','krabb
namespace :static do
desc 'Generate static site in ./out/ directory'
task :generate do
Dir.mkdir 'out' unless File.exist? 'out'
Dir.chdir 'out' do
`wget -mnH http://localhost:3000/`
end
`rsync -ruv --exclude=.svn/ public/ out/`
end
@jinpark
jinpark / HLS_dvr.sh
Last active August 29, 2015 14:11 — forked from John07/HLS_dvr.sh
# required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier
# you can schedule this with launchd to run e.g. weekly
# Specify in seconds how long the script should record (default here is 1 hour).
seconds=3600
# Date format for the recording file name
DATE=`date "+%d-%m-%y_%H-%M"`
# start ffmpeg recording
@jinpark
jinpark / jargon_file_glossary_mongoimport.json
Created October 13, 2014 09:05
Jargon file glossary json for mongoimport
This file has been truncated, but you can view the full file.
{"word":"(TM)","pronunciations":null,"grammmar":null,"definitions":[" [Usenet] ASCII rendition of the ™ appended to phrases that the author feels should be recorded for posterity, perhaps in future editions of this lexicon. Sometimes used ironically as a form of protest against the recent spate of software and algorithm patents and look and feel lawsuits. See also UN*X."]}
{"word":"/dev/null","pronunciations":["/dev·nuhl/"],"grammmar":"n.","definitions":[" [from the Unix null device, used as a data sink] A notional ‘black hole’ in any information space being discussed, used, or referred to. A controversial posting, for example, might end “Kudos to rasputin@kremlin.org, flames to /dev/null”. See bit bucket."]}
{"word":"/me","pronunciations":null,"grammmar":null,"definitions":[" [IRC; common] Under most IRC, /me is the “pose” command; if you are logged on as Foonly and type “/me laughs”, others watching the channel will see “* Joe Foonly laughs”. This usage has been carried over to mail and news, where the
@jinpark
jinpark / jargon_file_glossary.json
Created October 12, 2014 18:16
The Jargon File Glossary in JSON
This file has been truncated, but you can view the full file.
{
"(TM)": {
"pronunciations": [
"//"
],
"grammmar": null,
"definitions": [
" [Usenet] ASCII rendition of the ™ appended to phrases that the author feels should be recorded for posterity, perhaps in future editions of this lexicon. Sometimes used ironically as a form of protest against the recent spate of software and algorithm patents and look and feel lawsuits. See also UN*X."
]
},
This message is to all clients on our OpenVZ servers. A critical security vulnerability was published earlier today for OpenVZ. We have upgraded to the latest kernel and reboot all OpenVZ nodes. Due to the significance of the vulnerability and the existince of a public exploit, we did not have time to send out a mass email in advance of taking action. We posted an announcement on our News page in the Client Area and sent out some tweets on @RamNode and @NodeStatus before and during the process. You can read more about this vulnerability here: https://clientarea.ramnode.com/announcements.php?id=364 . As always, we highly recommend that you follow/bookmark http://twitter.com/nodestatus to stay up to date.
While we strive to maintain 100% uptime, this issue was unfortunately outside of our control, being a vulnerability with OpenVZ itself. We typically rely on rebootless updates from KernelCare, but they made it clear that a patch would not be forthcoming immediately. We could not risk everyone's data with a pu