Skip to content

Instantly share code, notes, and snippets.

View jinmingjian's full-sized avatar

Jin Mingjian jinmingjian

View GitHub Profile
@jinmingjian
jinmingjian / kimsufi_arch_post1
Last active April 8, 2018 02:09
kimsufi_arch_post1
# chang ssh and enable pub key
# nano -w /etc/ssh/sshd_config
# cp .ssh/authorized_keys2 /home/xxx/.ssh/authorized_keys
# change to ca's mirror
#/etc/pacman.conf
#[community]
#SigLevel = Never
#Include = /etc/pacman.d/mirrorlist
@jinmingjian
jinmingjian / kimsufi_arch_post0
Created April 24, 2015 10:43
kimsufi_arch_post0
#!/usr/bin/sh
pacman -S --force
pacman -S --force base
rm -rf /boot//boot/bzImage-*
grub-mkconfig -o /boot/grub/grub.cfg
useradd -m -G xxx -s /bin/zsh xxx
reboot
@jinmingjian
jinmingjian / gist:3e9b719a7b9b749d8d47
Created October 24, 2014 00:32
ssh-agent.service
[Unit]
Description=OpenSSH private key agent
Wants=environment.target
Before=environment.target
IgnoreOnIsolate=true
[Service]
Type=forking
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
#PIDFile=%t/ssh-agent.pid
@jinmingjian
jinmingjian / arch_install_basic.txt
Last active August 30, 2019 14:45
arch installation note on DELL r320
Schema:
1. pxe boot
2. partition: GRUB + GPT, vfat - boot partition, ext4
Guide:
Round#1: mini text mode
1. pxe boot from a tftp/dhcpc server. TBD.
@jinmingjian
jinmingjian / some_ssd_benchmarks
Last active April 8, 2018 02:09
some ssd benchmarks
Tools:
# hdparm -Tt /dev/sdb /dev/sda
$ dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc
# echo 3 > /proc/sys/vm/drop_caches
$ dd if=tempfile of=/dev/null bs=1M count=1024
$ dd if=tempfile of=/dev/null bs=1M count=1024

"Everyone needs a hobby." - Tony Stark, Iron Man 3

#SearchField Text {
background-color: #333;
color: #FFF;
}

change jdk to Builds in Cloudbee's Jenkins

  1. make sure your jdk package are ready to upload.

  2. Upload the files inside the archive to your private repository on Cloudbees forge (like, /private/abc/ ) so that you have */private/abc/<your_zipped_jdk>,...

  3. On the Jenkins configuration page ([https://YourAccountName.ci.cloudbees.com/configure](https://.ci.cloudbees.com/configure) (use your real account name / subdomain) create a new JDK Installation and set JAVA_HOME to /tmp/<your_jdk> (or any other version you want to use).

  4. Add a Pre Step and add the following shell script. First, it copies the JDK version you are using to the /tmp folder. Be sure to use your real account name / subdomain.

eventBroker.subscribe(IThemeEngine.Events.THEME_CHANGED,
new EventHandler() {
public void handleEvent(Event event) {
ITheme currentTheme = (ITheme) event.getProperty(IThemeEngine.Events.THEME);
if (currentTheme.getId().equals(THEME_DARKER_ID)) {
setupPreferences();
} else {
setToDefaultPreferences();
}
}
@Inject
protected IEventBroker eventBroker;
@Inject
EModelService modelService;
@Inject
private EHandlerService handlerService;
@Inject