Wednesday, November 23, 2022

Redis | Introduction to Redis

 

Introduction to Redis

Learn about the Redis open source project

Redis is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing an element to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set.

To achieve top performance, Redis works with an in-memory dataset. Depending on your use case, Redis can persist your data either by periodically dumping the dataset to disk or by appending each command to a disk-based log. You can also disable persistence if you just need a feature-rich, networked, in-memory cache.

Redis supports asynchronous replication, with fast non-blocking synchronization and auto-reconnection with partial resynchronization on net split.

Redis also includes:

You can use Redis from most programming languages.

Redis is written in ANSI C and works on most POSIX systems like Linux, *BSD, and Mac OS X, without external dependencies. Linux and OS X are the two operating systems where Redis is developed and tested the most, and we recommend using Linux for deployment. Redis may work in Solaris-derived systems like SmartOS, but support is best effort. There is no official support for Windows builds.

Tuesday, November 22, 2022

Overpaid FAANG Employees Are Getting A Harsh Reality Check

Here is the link. 

For quite some time now, FAANG has been the dream employer for most aspiring engineers and software developers and it’s not surprising why. FAANG blows traditional companies out of the water when it comes to compensation and their perks and benefits are also unmatched. But, over the past several months, the sentiment surrounding the tech industry has changed quite a bit. A significant amount of tech companies have been doing massive layoffs including even Facebook and Amazon. While Apple and Google have yet to do formal layoffs, they too have substantially pulled back on hiring, bracing for an economic downturn. Many of these companies hope that by acting early, they can minimize the long-term damage done to the company and its employees, but only time will tell. In the meantime, we’re seeing tens of thousands of tech workers being displaced, and I doubt they’ll have trouble finding new work, it’s not clear if they’ll be able to get nearly as much compensation. This may end up pulling down much of the inflated silicon valley tech salaries. This video explains the recent tech layoffs and what that means for the tech workforce.

Timestamps: 0:00 - Mass Layoffs 2:29 - The Mechanics Of Tech Salaries 5:36 - Shifting Landscapes 8:11 - A Crossroads 10:25 - The Future Of Tech Compensations







30% to 40% margin -

Director - $1.34M -
$897.8K - 4 years -
Dilute the stock - $8.7 billion dollars/ 1% if Meta is 1T dollar stock

Exon, AT&T

Dilution - Less than 1%, 300 million then it goes up 3%.

3% dilution - $70,000 -> $50,000


Gray stock: Graybug vision stock

The CEO consistently gas-lighted you about the company's future, and then stole your money by agreeing to a merger in which ALL of GRAY's remaining cash is spent for a 29% interest in another clinical stage company that has NOTHING to do with eye medicine and after 15 years "in business" has only managed to get a drug candidate into Phase II.

GRAY is now trading at 65 cents - down 35% - on this "exciting" merger news.

But you know what the failed CEO and BOD could have done?

A year ago they could have simply shut down GRAY and paid every shareholder close to $3 in cash.

But instead the "experienced professionals" decided it better to burn GRAY's cash for over a year on NOTHING but salaries and overhead, and then give all the remaining cash to another clinical stage biotech so it can squander the money on trials that will most likely in the end amount to nothing.

Is 65 cents today better than $3 a year ago?

The BOD at GRAY wants you to believe the answer is "yes."

23 October, 2022 

developments at GRAY so far have a lot of similarities with recent developments at IMRA ,

at IMRA they reduced their workforce by 80 %, they sold their programs to another competitor for a decent amount, and now they are merging the remaining company with another biotec company, reduction of workforce is the main pre-condition !

Install Linux on Windows with WSL

Linus for PHP developer | Linkedin learning course

 Set yourself up for PHP programming in Linux—the fast, powerful, and free development environment that can be virtualized on almost any machine, including Mac and Windows computers. Explore various Linux distributions and the LAMP stack: the most ubiquitous web server solution on the Internet. Begin by downloading Linux, installing the operating system, and then configuring each additional stack element: Apache, MySQL, and PHP. Instructor Jon Peck describes how the LAMP components work together to support and network your web applications. You'll also learn how to manage Linux from the command line, optimize your system's performance for virtualization, and troubleshoot common installation and configuration issues. Plus, install some of the top PHP tools and frameworks, including Composer, Symfony, and Laravel.


Note: The demonstrations use the Ubuntu distribution of Linux, but the skills are applicable to other Linux distributions.

Learning objectives

  • What is Linux and why should you use it?
  • Choosing a Linux distribution
  • Creating a virtual machine (VM)
  • Managing Linux from the command line
  • Configuring a Linux server
  • Managing Apache sites and modules
  • Configuring the MySQL database
  • Configuring PHP for development
  • Debugging PHP code in Linux
  • Installing PHP tools such as Composer and CodeIgniter
  • Managing VMs with VirtualBox
  • Troubleshooting LAMP

Learning Redis | Linkedin learning | Emmanuel Henri

 Redis—an in-memory data structure store—differs from relational databases like MySQL, and NoSQL databases like MongoDB. In this course, learn what Redis is and how it works as you discover how to build a client implementation using an ioredis client and a Node.js server. Emmanuel Henri explains how to install and set up Redis, and covers basic Redis tools and concepts, including persistence and replication. Plus, he reviews the different data types available, and demonstrates what you can do with strings, hashes, and lists. To wrap up, he goes over security options and best practices for securing a Redis instance.

Learning objectives

  • Installing and setting up Redis
  • Reviewing the basics of data types
  • Setting up persistence and replication
  • Exploring strings and lists
  • The hash data structure
  • Securing a Redis instance
  • Publishing and subscribing with Redis

PHP | Laravel and Artisan

 Artisan is the command line interface included with Laravel. Artisan exists at the root of your application as the artisan script and provides a number of helpful commands that can assist you while you build your application. To view a list of all available Artisan commands, you may use the list command:

PHP | CodeIgniter

 CodeIgniter is loosely based on the popular model–view–controller (MVC) development pattern. While controller classes are a necessary part of development under CodeIgniter, models and views are optional.[7] CodeIgniter can be also modified to use Hierarchical Model View Controller (HMVC[8]) which allows the developers to maintain modular grouping of Controller, Models and View arranged in a sub-directory format.

CodeIgniter is most often noted for its speed when compared to other PHP frameworks.[9][10][11] In a critical take on PHP frameworks in general, PHP creator Rasmus Lerdorf spoke at frOSCon in August 2008, noting that he liked CodeIgniter "because it is faster, lighter and the least like a framework."[12]

Symfony Components

 Symfony Components are decoupled libraries for PHP applications. Battle-tested in hundreds of thousands of projects and downloaded billions of times, they're the foundation of the most important PHP projects.

梦醒之后

 梦醒之后


在同舟共济、守望相助的背后,很多人也开始反思,为什么这一波裁员潮会来得如此汹涌?

过去十年,科技行业经历了一个高速扩张期,三年买房、十年财务自由的神话在硅谷似乎比比皆是。美联储疯狂地印着钞票,科技公司们肆意挥金扩张,一个简单的业务或许只需要10个人即可运转,但在资本的狂欢下,最后招来了100人。员工们晒着一个比一个大的包裹,沉浸在“钱多事少福利好”的甜梦里,以为这就是自己未来生活的常态。

“与其说是去泡沫,不如说现在科技公司们在还它们前两年无序扩张欠下的债。只是不幸的是,当在这个过程开始启动时,普通员工被首先推在了最前面。”Alex谈道。

在此次访谈中,几位受访者们也都向硅星人谈了他们亲历裁员的体会、以及他们对目前同样身在科技职场上朋友们的一些建议。

在任何时候获取信息很重要,无论是关于行业信息、公司业务信息、人员信息还是财务信息,知道得越早、越多对自己越有利。

永远不要认为自己绝对安全、在工作中“躺平”。互联网时代技术日新月异,保持谦逊,持续学习和打牢基础,让自己任何时候都拥有能够上岸的竞争力。

做好家庭财务风险控制和投资管理,要在最坏的情况下为家庭留足至少半年到一年的现金储备。

放下自以为拥有的行业光环,摆正自己作为普通打工人的位置。努力提高自己在组内、公司内的影响力,积极拓展人脉资源,不让自己成为最被先淘汰的选项。

裁员 | 硅谷

 实际上,在硅谷正在进行的这场大裁员中,并不是只有那些入职时间短或者绩效不佳的员工才会受到影响,在很多公司内部,裁员更像是一场无差别的“大屠杀”。只要你所在的业务组公司不想要了,那么无论你是副总裁级别、主管级别、经理级别还是普通员工,无论你的工作时间多长、绩效评价有多好,都无一能够幸免。


“在我们公司的裁员中,让我印象深刻或者说是很意外的一点就是,我觉得很多完全不应该被裁掉的人这次也在名单之中。”在两个月前亲历了Snap 20%大裁员的Leo告诉硅星人。“有几个被裁的老员工他们对公司业务的理解很深入,技术水平也非常高,怎么裁也不该轮到他们的。”

但回过头看,Leo觉得这一切可能也无关个人。当执行大规模裁员计划时,很多公司其实并没有那么多精力去研究每个人的能力怎么样,而是会站在整个公司效率最优化的角度去决定业务去留。而如果刚好你在的组在当前对于公司没有那么重要,那么你就很有可能被波及。

在Snap的裁员中,Leo自己所在的业务就被整个关掉,组里从技术人员到产品经理几乎全军覆没。回忆起当天裁员的经历,Leo觉得用几个词可以形容:冷静、迅速甚至有些残酷

Professor Xiali Hei | NSF award

 Xiali (Sharon) Hei is an assistant professor in the School of Computing and Informatics at the University of Louisiana at Lafayette. Prior to joining the University of Louisiana at Lafayette, she was an assistant professor at Delaware State University from 2015-2017. Sharon received her Ph.D. in computer science from Temple University in 2014, focusing on computer security. Her advisors were Dr. Xiaojiang Du (IEEE Fellow) and Dr. Shan Lin.

Her collaborators (past and present) have included Sara Rampazzi, Zhiqiang Lin, Insup Lee (ACM Fellow, IEEE Fellow), Jie Wu (IEEE Fellow, AAAS Fellow), Oleg Sokolsky, Fei Hu, and Kevin Fu (IEEE Fellow, Sloan Research Fellow).

She was awarded Alfred and Helen M. Lamson Endowed Professorship, an NSF Track 4 Faculty Fellowship, an NSF MRI award, a Facebook award, an LA BoRSF CEMC Talent Initiative Fund,  an LA BoRSF Seed fund, an NSF ERSCoR RII Track 1 award, an NSF CRII award, and a Delaware DEDO grant, etc. Also, she earned an M.S. in Software Engineering from Tsinghua University and a B.S. in Electrical Engineering from Xi’an Jiaotong University. She got several awards, such as ACM 2014 MobiHoc Best Poster Runner-up Award, Dissertation Completion Fellowship, The Bronze Award Best Graduate Project in Future of Computing Competition, IEEE INFOCOM, and IEEE GLOBECOM student travel grant, etc. Her papers were published at USENIX Security Symp., ACM CCS, IEEE INFOCOM, RAID, ASIACCS, etc. She is a TPC member of the USENIX Security Symp. , IEEE EuroS&P,  IEEE GLOBECOM, SafeThings, AutoSec, IEEE ICC, WASA, etc. She has been an IEEE senior member since 2019.

Monday, November 21, 2022

马斯克裁员击碎硅谷神话

马斯克裁员击碎硅谷神话:立刻走人、没有N+1

 

10月底马斯克接手推特后,在推特掀起了一场裁员风暴,目前这场风暴已经在硅谷持续发酵,Meta、亚马逊......等巨头纷纷爆出裁员消息。最令人感到意外的是在推特的裁员中,并没有像国内互联网巨头让员工“毕业”时般慷慨,等待他们的只有立刻走人和廉价赔偿。

国内互联网公司从去年开始持续“毕业”员工。不过这些被“毕业”的员工,基本上都按照劳动法的要求拿到了N+1的赔偿。所谓N+1是指按照工作年限来计算赔偿年限,例如一个员工在公司三年,那么在公司裁员时候需要赔偿4个月工资,而且赔偿的基数是按照过去十二月平均薪资来计算。对于以高薪闻名的互联网企业,这笔赔偿金额非常可观。但是此次推特裁员中,按照加州的法律并没有N+1的要求,甚至美国各州也没有这样的福利,最多只能给员工60-90天的赔偿,并且不看工作年限。按照网上公开数据来推算,一名主管级别的推特工程师,年薪24万美元,按照月薪2万美元计算,最终获得的赔偿也只在4万到5万美元,合人民币30-40万元之间,但同样级别的高级工程师在国内被裁员,最高可以拿到百万级别的赔偿。

更加令人寒心的是,马斯克的裁员比起国内大厂近乎“残暴”,人们在公司的IT账户被锁,职业生涯由不够人性化的邮件终结,半数员工队伍瞬间灰飞烟灭。这简直就像复仇者联盟中的灭霸决定在商业领域小试身手。一些推特员工已经对公司提起诉讼,声称公司违反了《工人调整和再培训通知法》和加州的WARN法案,该法案要求公司在大规模解雇员工时至少提前60天通知,不过并没有影响马斯克拔刀的速度。目前原7500人的推特已经完成了4400人的裁员工作,并且还在持续。于此相比,国内相对比较温和,很多人在接到通知后,HR都会给员工个把月缓冲期,用来看看内外部机会。

埃隆·马斯克对于推特(Twitter)的收购引发了政策上的问题:如此重要的公共讨论平台能被世界上最富有的人所有吗?引发了法律上的问题:他在收购完成后的几天内开掉如此多员工的决定合法吗?还有策略的问题:通过把商业模式从依赖广告转到依赖付费订阅,推特能赚钱吗?但这同时又是对于特定管理风格的一场极端公共测试。在对于工作、决策和CEO所扮演角色的认识方面,马斯克先生在逆流而上。

他对于员工的态度是其反主流举措的明显例证。作为一名未来主义者,马斯克先生是一名相当老派的老板,他不喜欢远程办公。今年早些时候,他给特斯拉的员工发了邮件,要求他们每周至少在办公室工作40小时。他发推文指出,任何认为这种要求过时的人都可能是“在某处假装工作”。曾经硅谷的互联网公司令人趋之若鹜,国内甚至专门有中介帮人“润过去”,很多人幻想着到了美国以后就能过上躺平摸鱼的生活,永远摆脱国内996的卷。现在马斯克的这一引领风尚的做法正在表明:躺平是不可能的。在一个社会主义国家,况且都会出现996和裁员,幻想跑到老牌资本主义国家躺平,无疑痴人说梦。

他的批评者不得不承认,这种“要么听我的,要么滚蛋”的策略以前曾奏效过。在他的另两家公司特斯拉和SpaceX,马斯克先生也许没能展示同理心,但他宣扬着从普及电动汽车到殖民火星等像行星一样宏大的使命感。很难讲他这一招在推特能否奏效。他对于该产品特别宏伟的愿景是打造充满了自由言论的“数字城镇广场”。然而,这一次他并非是在挑战动作迟缓的在位者,而是在给一家已有的企业打补丁。在这里,判断和政治与工程技术同样重要。

马斯克先生决策的方式也不走寻常路。对于CEO如何决策的研究相对较少,但哈佛商学院在2020年的一篇工作论文中就此进行了尝试,询问该院的262名校友日常工作中是如何决策的。

论文作者发现,的确有很多种不同的决策方式:有些经理人主要凭直觉,另一些人采取非常正式的流程。但研究人员发现,使用更加结构化流程的老板,一般所领导的公司规模更大、增长更迅速(随意决策的公司走向则不明确),他们也更倾向于缓慢决策。马斯克先生及其追随者们决策时则截然不同:迅速、非正式、有侵略性。关于被解雇的推特员工受邀重回公司的报道已经在满天飞了。

马斯克先生在另一个方面也非正统。管理领域思想家Peter Drucker称,CEO应该成为外部世界与公司内部运作之间的桥梁。Drucker写道,在公司中没有任何其他职位的人能够兼具这两种视野。

与其说马斯克先生是在鸿沟上架桥,还不如说他使得公司内部和外部不分。他的个人品牌和财富是与经营的其他公司分不开的。他在推特公司走得更远了,在自己的推文中提出产品理念,对观众的观点开展问卷投票,并就情况的进展进行实时评论。而且推特自身就是每个人就事物发展公开发表意见的平台,其中包括用户、前员工、创立公司的人、政策制定者和专家,本身就没有什么内部可言。

你可能会抗议说马斯克先生和这笔交易一样,都是特例。当他首次就购买推特出价时,他明确说不是出于经济方面的考虑。他后来曾努力想要完全退出该交易。拥有社交媒体平台的亿万富翁的故事,与多数公共公司拿年薪高管所面临的挑战,两者相去甚远。也许如此。但如果马斯克先生通过对员工残酷、不借助PPT决策、通过玩梗做管理这一套,在最新的一次历险中再次取得成功的话,MBA的教程可能真是需要更新才行了。

至少,马斯克先生成为了全世界劳动人民的教员,他用自己的实际行动再次证明了,充满鲜花的乌托邦世界并不存在。在工作中躺混摸鱼,只不过是在温水煮青蛙,水总有开的一天,青蛙未必还能跳出来。

Zappos | Tony Hsieh

 全球最大网上鞋商Zappos的华裔创办人谢家华(Tony Hsieh)去世2年后,其家人和生前商业伙伴为争夺5亿元遗产而对簿公堂。诉讼纪录显示,谢家华在人生最后阶段吸毒成瘾以至于精神错乱,包括幻想自己会变成水晶,又宣称要建造主题公园,游客只需以贝壳付费就可参观。

综合《纽约邮报》及英国《每日邮报》报道,本星期公开的法庭文件显示,谢家华去世前1年开始吸毒,首先是高剂量会导致幻觉的氯胺酮(Ketamine),然后是俗称“笑气”的一氧化二氮(nitrous oxide),其好友透露,谢家华可以每天消耗50罐“笑气”,因此临终前的日子精神状况非常不稳。

协助管理其遗产的律师表示,谢家华频频做出令人费解的决定,例如买下Zappos总部时,成交价比市价高出 4000万元;死前数星期签下3000万元合同,委托某人“经营船吧和冰城堡”;又宣称要建造主题公园,可让游客用贝壳代替现金消费。到了去世前1个月,谢家华宣称自己正在“结晶化”,而且进入虚拟世界,已经分不清现实和幻觉,因此被送入急症室。

有份参与争夺遗产的财务经理李托尼(Tony Lee,音译)表示,谢家华吸食的毒品由同胞兄弟谢安迪(Andy Hsieh)提供,谢安迪曾购买数千罐“笑气”,而在谢家华死前几个月,又在明知谢家华肝硬化的情况下让他喝酒,也多次游说谢家华转移数百万元财产。

但法庭文件显示,谢安迪否认鼓励谢家华吸毒,表示自己反而是协助对方戒毒,也曾在谢家华不在时,趁机扔弃其家中及车内的毒品。

谢家华创办Zappos之后,将公司以12亿元卖给亚马逊,去世时只有46岁。事发在2020年11月,他在某名女性友人位于康州的豪宅内死于火灾,当时调查发现,谢家华与女方争执后,带同气体暖炉、毯子以及“笑气”到储藏室睡觉,结果引发火灾时逃避不及,死后并未立下遗嘱。

BSC bible study | 列王纪下4:1-38:以利沙、寡妇和书念妇人

Linux for PHP developers | Linkedin learning

Creating a Redis Client using the .NET System.IO.Pipelines and Kestrel Sockets Libraries

Cannot run XAMPP - MySql

 Here is the article.

  1. Make a backup for this folder C:\xampp\mysql\data (make sure your backup folder's name is not backup) .
  2. Now Copy all files/folders from C:\xampp\mysql\backup except ibdata1 to avoid error of table does not exist .
  3. Paste all copied files/folders to C:\xampp\mysql\data

Also I did copy all files but left ibdata1 and also logfiles unchanged. 
ibdata1
ib_logfile0
ib_logfile1


And then I recreated the user account for the database


MySQL 5.7 Reference Manual

Here is the link. 

10 hours to read the reference. 

  1. First hour - The innoDB storage engine 
  2. ...

The MySQL software delivers a very fast, multithreaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. MySQL is a trademark of Oracle Corporation and/or its affiliates, and shall not be used by Customer without Oracle's express written authorization. Other names may be trademarks of their respective owners.

The MySQL software is Dual Licensed. Users can choose to use the MySQL software as an Open Source product under the terms of the GNU General Public License (http://www.fsf.org/licenses/) or can purchase a standard commercial license from Oracle. See http://www.mysql.com/company/legal/licensing/ for more information on our licensing policies.

The following list describes some sections of particular interest in this manual:

Backup and restore MySQL databases

Here is the article.

 As you use XAMPP, you might find that you need to backup or restore a MySQL database. There are two easy ways to do this with XAMPP: using the browser-based phpMyAdmin tool or using MySQL’s command-line tools. This guide describes both options.


Friday, November 18, 2022

MySQL | Fail to start | XAMPP


2022-11-18 15:41:35 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

2022-11-18 15:41:35 0 [Note] InnoDB: Uses event mutexes

2022-11-18 15:41:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

2022-11-18 15:41:35 0 [Note] InnoDB: Number of pools: 1

2022-11-18 15:41:35 0 [Note] InnoDB: Using SSE2 crc32 instructions

2022-11-18 15:41:35 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M

2022-11-18 15:41:35 0 [Note] InnoDB: Completed initialization of buffer pool

2022-11-18 15:41:35 0 [Note] InnoDB: 128 out of 128 rollback segments are active.

2022-11-18 15:41:35 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2022-11-18 15:41:35 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2022-11-18 15:41:35 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.

2022-11-18 15:41:35 0 [Note] InnoDB: Waiting for purge to start

2022-11-18 15:41:35 0 [Note] InnoDB: 10.4.24 started; log sequence number 24322347; transaction id 11085

2022-11-18 15:41:35 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool

2022-11-18 15:41:35 0 [Note] Plugin 'FEEDBACK' is disabled.

2022-11-18 15:41:35 0 [Note] Server socket created on IP: '::'.

How to Install Redis For PHP in Windows?

Here is the article.

Redis is Remote Dictionary Server. It is an open-source fast performance data structure store. It is used for caching, session management & gaming etc. Redis is basically installed in Linux only. But by using other method we can install it in Windows also. But before that you need to install PHP in your device.