Skip to content

Instantly share code, notes, and snippets.

View hnishi's full-sized avatar
🏠
Working from home

hnishi hnishi

🏠
Working from home
View GitHub Profile
@k-takata
k-takata / 256colors2.bat
Last active November 25, 2023 16:23
Testing ANSI color sequence on Windows 10 and other terminal emulators
@echo off
rem Based on Todd Larason's 256color2.pl.
rem Ported to Windows 10's Command Prompt.
setlocal EnableDelayedExpansion
rem display the colors
rem first the system ones:
echo System colors:
@azu
azu / server-react.md
Last active February 25, 2021 04:30
サーバサイドとReact production build

サーバサイドとReact

要約: Reactをサーバサイドで使うときも、クライアントサイドのように圧縮(code eliminate)しないと遅いよ

Reactはdev向けのコードを大量に含んでいる。 これはprocess.env.NODE_ENV !== 'production'の時実行されるassertや警告などが主となりproductionには必要ない。 そのため、process.env.NODE_ENV = 'production'をしないとかなり不利な結果を得る。

I tend to agree that "compiling server side code with webpack to remove access to process" is not what Node developers would typically do, and likely many React users are not even aware of this possibility. So the current results are probably more representative of React SSR perf in the wild. However, it can also be a bit unfair to not show React's perf with full optimization.

@joepie91
joepie91 / vpn.md
Last active June 6, 2024 16:23
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@SavinaRoja
SavinaRoja / .pymolrc
Created July 30, 2015 02:44
.pymolrc example file
#Beware: when scripting in PyMOL Command Language, full-line comments only
#Rendering Settings
# (<default>), <remark>
set ribbon_width, 8
# (3), wider ribbons
set antialias, 2
# (1), smoother antialiasing
set cartoon_fancy_helices, 1
@10sr
10sr / a.md
Last active February 24, 2020 15:31
.profile, .bashrc, .bash_profile... どこに何を書くか
@roachhd
roachhd / README.md
Last active June 7, 2024 09:32
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@knmkr
knmkr / pg-import-gzipped-csv-from-stdin.md
Last active August 20, 2019 06:41
PostgreSQL で gzip された CSV ファイルを stdin から読み込む。

PostgreSQL で gzip された CSV ファイルを stdin から読み込む。

$ echo "1,2" > a.txt
$ gzip a.txt
$ createdb --owner=knmkr test-copy
$ gunzip -c a.txt.gz| psql test-copy knmkr -c "COPY test (a,b) FROM stdin DELIMITERS ','"
$ psql test-copy knmkr -c "SELECT * FROM test;"
 a | b
---+---

1 | 2

@mpikoula
mpikoula / calc_velocities.tcl
Created June 4, 2014 10:21
Velocity calculation per slab (VMD)
#Calculates the average velocity over all frames in 1-Angstrom wide slab over the y-axis
#To run simply "source calc_velocities.tcl" from the VMD tk console
#load topologies and trajectories
set firstfr 0
set lastfr 53079
set mol1 [mol new ox.prmtop]
mol off $mol1
mol addfile just_oxygens_every5ps.nc first $firstfr last $lastfr waitfor all $mol1
@rxaviers
rxaviers / gist:7360908
Last active June 8, 2024 15:23
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: