Skip to content

Instantly share code, notes, and snippets.

View Axure's full-sized avatar
😃
Time is money

Hu Zheng Axure

😃
Time is money
View GitHub Profile
@Axure
Axure / Chipehll.js
Last active August 29, 2015 14:03 — forked from p0w3r-/Chipehll
this.run = function() {
var fixedheight = 0;
if (this.openflag && this.nvdata.next) {
var nvnexttop = document.body.scrollTop || document.documentElement.scrollTop;
var dofixed = nvnexttop !== 0 && document.documentElement.clientHeight >= 15 && this.nvdata.next.getBoundingClientRect().top - this.nvdata.height < 0;
if (dofixed) {
if (this.nv.style.position != 'fixed') {
this.nv.style.borderLeftWidth = '0';
this.nv.style.borderRightWidth = '0';
this.nv.style.height = this.nvdata.height + 'px';
@Axure
Axure / zjuwlan.sh
Created August 16, 2014 06:25 — forked from Hexcles/zjuwlan.sh
#!/bin/bash
# Abort when curl fails
set -e
USERNAME=
PASSWORD=
echo -n "Force logging off: "
curl 'https://net.zju.edu.cn/rad_online.php' -H 'Origin: https://net.zju.edu.cn' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: */*' -H 'Referer: https://net.zju.edu.cn/srun_port1.php?url=http://www.example.com/' --data "action=auto_dm&username=${USERNAME}&password=${PASSWORD}" >/dev/null 2>&1
echo "success!"
@Axure
Axure / p5
Last active August 29, 2015 14:13 — forked from yxdb/p5
go to the 1st comment for the problem statement please. :)
@Axure
Axure / README.md
Last active August 29, 2015 14:17 — forked from agnoster/README.md

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

#include <stdio.h>
#include <stdlib.h>
struct closure {
void (* call)(struct closure *);
int x;
};
:javascript
$(document).ready(function() {
window.loadIngredientSuggestionsEditor(#{@ingredients});
});
%h1 Edit ingredient suggestions
#js-ingredient-suggestions-editor
@Axure
Axure / promises.md
Last active August 29, 2015 14:21 — forked from domenic/promises.md

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
diff --git gdk/quartz/gdkscreen-quartz.c gdk/quartz/gdkscreen-quartz.c
index eafaf20..1cf98e2 100644
--- gdk/quartz/gdkscreen-quartz.c
+++ gdk/quartz/gdkscreen-quartz.c
@@ -75,8 +75,17 @@ gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
NSScreen *nsscreen;
nsscreen = [[NSScreen screens] objectAtIndex:0];
- gdk_screen_set_resolution (screen,
- 72.0 * [nsscreen userSpaceScaleFactor]);
@Axure
Axure / carbon.css
Last active August 29, 2015 14:27 — forked from dfeng/carbon.css
Reddit Carbon (for Chrome)
body{
background:#1a1a1a;
color:#ddd
}
.comment .usertext .md p>a:visited,.md a,.res.res-nightmode .tagline a,a,h2 a:visited{
color:#3498db;
-webkit-transition:color .15s ease-in-out;
-moz-transition:color .15s ease-in-out;
-o-transition:color .15s ease-in-out;