Skip to content

Instantly share code, notes, and snippets.

@chusiang
chusiang / myToReadBookLists.md
Last active March 27, 2024 08:49
凍仁的讀書清單

凍仁的讀書清單

Migrated to GitLab and GitHub.

看了《學徒模式》一書後,凍仁試著用 Gist 管理自己的待讀書單,並不時修改其閱讀順序。您可以在 revisions 找到編修記錄。

目錄:

  1. 待讀書單
  2. 已讀書單
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@hieubuiduc
hieubuiduc / install_gearman_php.sh
Created December 12, 2015 17:42
Install Gearman PHP extension on CentOS 6,7
#!/bin/sh
# Auto update
yum update
# Install the required packages
yum install libgearman-devel gcc
# Install php
yum -y install php php-pear php-mysql php-mcrypt php-mbstring
@orangetw
orangetw / babyfirst.php
Created October 19, 2015 07:17
HITCON CTF 2015 Quals Babyfirst
<?php
highlight_file(__FILE__);
$dir = 'sandbox/' . $_SERVER['REMOTE_ADDR'];
if ( !file_exists($dir) )
mkdir($dir);
chdir($dir);
$args = $_GET['args'];
for ( $i=0; $i<count($args); $i++ ){

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@dong920740928
dong920740928 / gearman_java中的使用.md
Last active August 3, 2017 11:12
gearman_java中的使用

2 用java编写gearman的client端及端程序

2.1 加入包依赖

这里给出maven中应添加的依赖,直接copy进pom.xml即可 org.gearman.jgs java-gearman-service [0.7.0-SNAPSHOT,)

@pjdietz
pjdietz / cloudSettings
Last active June 18, 2020 22:29
Testing Protected Method of Abstract Class with PHPUnit
{"lastUpload":"2020-06-18T22:29:09.889Z","extensionVersion":"v3.4.3"}
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@luxixing
luxixing / phpstorm
Created October 24, 2013 11:04
PHPStorm 使用技巧
快捷键:
ctrl+tab: switcher,在已打开文件之间或者工具窗口间切换
alt+alt: 连续两次快速按下alt键不放,显示tool windows(project,database ...)
ctrl+k: 快速调用 commit changes 对话框
alt+F3: 显示搜索窗格,对当前文件进行搜索,然后配合ctrl+alt+r,可以进行替换操作
ctrl+shift+f: find in path 在指定文件夹或者整个project内搜索,ctrl+shift+r进行替换操作
ctrl+shift+alt+t: 快速rename,里面有好几个选项,慢慢理解吧
shift+F6: rename,自动重命名该变量所有被调用的地方
ctrl+shift+n: 快速导航到指定文件,弹出一个dialog,输入文件名即可

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)