Skip to content

Instantly share code, notes, and snippets.

View jinmingjian's full-sized avatar

Jin Mingjian jinmingjian

View GitHub Profile
@jinmingjian
jinmingjian / hello-dartium-arch
Created April 13, 2012 15:22
hello dartium for arch - 20120412
current dartium is built against with Ubuntu 32bit. But Arch is often a minium system. And very possibly with a 64 bit kernel. So, some depencies are needed to be resolved.
sudo pacman -S lib32-libxss
sudo pacman -S gcc-multilib
install lib32-nspr here:
https://aur.archlinux.org/packages.php?ID=55204
install lib32-nss here:
https://aur.archlinux.org/packages.php?ID=55203
install lib32-db here:
@Inject
private void setPrefReferences(
@Preference(nodePath = "org.eclipse.ui.editors") IEclipsePreferences prefUI,
@Preference(nodePath = "org.eclipse.jdt.ui") IEclipsePreferences prefJDT) {
this.prefUI = prefUI;
this.prefJDT = prefJDT;
}
<extension
id="id1"
point="org.eclipse.e4.workbench.model">
<processor
beforefragment="true"
class="eclipse.themes.darker.DarkerThemer">
</processor>
</extension>
"A model processor is a normal injectable POJO class whose processing is triggered by an @Execute-annotated method."
@Inject
protected IEventBroker eventBroker;
@Inject
EModelService modelService;
@Inject
private EHandlerService handlerService;
@Inject
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();
}
}

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.

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

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

@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