Skip to content

Instantly share code, notes, and snippets.

@ld100
ld100 / ArchLinuxWSL2.md
Last active April 23, 2024 22:42
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@tbrisbout
tbrisbout / talk.vimrc
Last active December 13, 2015 17:26
talk vimrc
" augroup reload_talk_vimrc
" autocmd!
" autocmd BufWritePost *.vimrc source ~/dev/talk.vimrc
" augroup END
" ================ General Config ================
set nocompatible
syntax enable
set encoding=utf-8
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
"use strict";
var Promise = require("bluebird");
describe("ES7 async functions in Mocha", function() {
it("are really cool!", async function(){
console.log("waiting...");
await Promise.delay(1000);
@ThomasCrevoisier
ThomasCrevoisier / ClojureScript_example
Created December 17, 2014 21:59
Simple example of ClojureScript
(ns poney.world)
(defn hastalavistaify [xs]
(str "Hasta la vista " xs))
(hastalavistaify "Thomas") ;;; Outputs : "Hasta la vista Thomas"
(map hastalavistaify ["Thomas" "poney" "mutability"]) ;;; Outputs : ("Hasta la vista Thomas" "Hasta la vista poney" "Hasta la vista mutability")
@btford
btford / chillax.md
Created October 30, 2014 06:59
Why you shouldn't worry so much about migrating with Angular

Several developers asked me about how difficult it will be to migrate Angular 1 to Angular 2. Angular 2 isn't done, so I legitimately have no idea how hard it will be. But there are a few high-level guiding principals in the design of Angular 1 that make adapting to changes like this fairly painless.

Angular 1 was designed so it would have a fairly minimal API surface. Let's look at controllers, since these are the meat of your app. Controllers are just functions that get passed other components as arguments:

MyController ($scope) {
  $scope.list = [];
  
  $scope.addItem = function (name) {
    $scope.list.push({
@stefansundin
stefansundin / install-pre-push.sh
Last active October 12, 2023 10:33
Git pre-push hook to prevent force pushing the master/main branch.
#!/bin/bash
# This script will install a Git pre-push hook that prevents force pushing the master/main branch.
# There are three variants that I have built:
# - pre-push: prevents force-pushing to master/main.
# - pre-push-2: prevents force-pushing to master/main depending on the remote (you need to edit the file!).
# - pre-push-3: prevents any type of pushing to master/main.
# Set the desired version like this before proceeding:
# FILE=pre-push
# Single repo installation:
@zbabtkis
zbabtkis / StyleCopier.js
Last active December 30, 2015 07:39
Utility function to copy rules from all stylesheets to another document
/**
* Utility function to copy rules from all stylesheets to another document
*
* @author Zachary Babtkis <zackbabtkis@gmail.com>
* @date December 4th 2013
* @License WTFPL
*/
/**
* copy styles
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 7, 2024 01:38
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶