Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
zulhfreelancer / install-docker.md
Last active May 11, 2024 22:28
Install Docker oneliner script

Just install Docker

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

Install Docker and Rancher Server

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh && sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server

@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@mp4096
mp4096 / ppt2pdf.ps1
Created April 28, 2016 10:56
Batch convert PowerPoint files to PDF
# Batch convert all .ppt/.pptx files encountered in folder and all its subfolders
# The produced PDF files are stored in the invocation folder
#
# Adapted from http://stackoverflow.com/questions/16534292/basic-powershell-batch-convert-word-docx-to-pdf
# Thanks to MFT, takabanana, ComFreek
#
# If PowerShell exits with an error, check if unsigned scripts are allowed in your system.
# You can allow them by calling PowerShell as an Administrator and typing
# ```
# Set-ExecutionPolicy Unrestricted
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 11, 2024 22:17
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@ripperhe
ripperhe / README.md
Created October 28, 2022 05:02 — forked from IsaacXen/README.md
(Almost) Every WWDC videos download links for aria2c.

Comment to https://www.reddit.com/r/ProgrammingLanguages/comments/1cphrxp/is_this_a_sane_set_of_tokens_for_my_lexer_a_few/

Also, do you guys have any resources on algorithms on ASTs, for type checking, maybe about linear typing and borrow checking as well? That's assuming the AST is the place where I'm supposed to check this sort of stuff.

There are a number of different approaches to typechecking, so there isn't a single answer or direction to go. For systems that support strong type inference, there are two well-known approaches: Hindley-Milner (HM) and bidirectional (bidir) systems, and these approaches aren't entirely separate (HM is often put in bidirectional checking to help with generics). There is also the simpler unidirectional approach taken by older languages e.g. Java, and the simpler way of handling generics by annotating every generic function and datastructure.

Giving direction on typechecking is unfortunately difficult because it is opinionated, because there is a line to straddle with wh

@yeesf
yeesf / index.html
Created March 21, 2024 18:02
Website demo
<div class="bg">storeplus</div>
<nav>
<div class="logo">
<img src="https://raw.githubusercontent.com/CleverYeti/TempAssets/main/Icon.png" width="512px" height="512px" alt="Logo">
<span>Custom Websites</span>
</div>
<div class="navspace"></div>
<div class="navmenu">
@Regularname11
Regularname11 / css-media-queries-cheat-sheet.css
Created May 11, 2024 22:07 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active May 11, 2024 22:07
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@luke161
luke161 / Singleton.cs
Last active May 11, 2024 22:05
Unity MonoBehaviour Singleton. Base class for creating a singleton in Unity, handles searching for an existing instance, useful if you've created the instance inside a scene. Also handles cleaning up of multiple singleton instances in Awake.
/**
* Singleton.cs
* Author: Luke Holland (http://lukeholland.me/)
*/
using UnityEngine;
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{