Skip to content

Instantly share code, notes, and snippets.

View xixiaofinland's full-sized avatar
:octocat:

Xi Xiao xixiaofinland

:octocat:
View GitHub Profile
@daisylb
daisylb / install-eclipse.sh
Created July 8, 2011 03:03
Installing the Latest Eclipse in Ubuntu
#!/bin/bash
# If you're reading this on the GitHub gist, scroll down for instructions.
# If not, go to https://gist.github.com/1071034
icon_url="http://shaun.boyblack.co.za/blog/wp-content/uploads/2009/05/maceclipse4.zip"
eclipse_bin="#!/bin/sh
export ECLIPSE_HOME='/opt/eclipse'
\$ECLIPSE_HOME/eclipse \$*"
@yevgenko
yevgenko / .Xdefaults
Created August 24, 2011 02:58
URxvt settings with solarized theme
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@staltz
staltz / introrx.md
Last active August 15, 2025 20:30
The introduction to Reactive Programming you've been missing
@nolanlawson
nolanlawson / protips.js
Last active November 19, 2024 02:40
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@TheBB
TheBB / loading.org
Last active January 4, 2025 09:25
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the

@tobias
tobias / setjdk.fish
Created July 12, 2016 18:16
Manage multiple java versions on the mac from the fish shell
function setjdk
if test -n "$JAVA_HOME"
removeFromPath "$JAVA_HOME/bin"
end
set -gx JAVA_HOME (/usr/libexec/java_home -v $argv[1])
set -gx PATH $JAVA_HOME/bin $PATH
end
function removeFromPath
set -l idx 0
export ORG_ALIAS='DummyScratchOrg'
export PROJECT_NAME='DummyProject'
export PERMISSION_SET='DummyPermSet'
export IMPORT_PLAN='Dummy-plan.json'
# Create a Salesforce DX project
sfdx force:project:create -n $PROJECT_NAME
# Regist development/sandbox org
sfdx force:auth:web:login [-d] -a $ORG_ALIAS
@xixiaofinland
xixiaofinland / sfdx-cheatsheet.sh
Last active October 9, 2024 14:54
Salesforce SFDX Cheat Sheet
# Proudly supplied by Salesforce Way Site: https://salesforceway.com
# This cheatsheet contains the most often used SFDX commands for beginners to get a jumpstart.
# Hint. it is highly recommended to use `-h` to check the usage of any SFDX commands and corresponding parameters.
# For instance, use `sfdx force:auth:web:login -h` to checke what `-d` `-a` parameters do
# List down all supported dx commands:
sfdx force:doc:commands:list
# Check current DebHub and Scratch Org status
sfdx force:org:list
@9bitbear
9bitbear / _MONERO-mining-ubuntu16.04.md
Last active March 22, 2021 10:45
XMR mining on Ubuntu
@tstachl
tstachl / .eslintrc.json
Last active April 24, 2018 12:41
Sane default eslintrc close to Salesforce DX.
{
"env": {
"browser": true
},
"parserOptions": {
"ecmaVersion": 5
},
"globals": {
"$A": true,
"AuraContext": true,