Skip to content

Instantly share code, notes, and snippets.

View mu-hun's full-sized avatar
💡
No Silver Bullet

Mu hun mu-hun

💡
No Silver Bullet
View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@frangio
frangio / ruby-polyfill.css
Created April 12, 2012 19:17
Ruby Polyfill
/* Simplified version of http://www.useragentman.com/blog/2010/10/29/cross-browser-html5-ruby-annotations-using-css/
for use with Modernizr.load() */
ruby {
display: inline-table;
text-align: center;
border-collapse: collapse;
border: none;
vertical-align: middle;
border-bottom: solid 0.75em transparent;
@theconektd
theconektd / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@digitaljhelms
digitaljhelms / gist:3099010
Created July 12, 2012 15:58
Squash the first two commits in a git repository's history

The scenario

Your repository has two commits:

$ git log --oneline
957fbfb No, I am your father.
9bb71ff A long time ago in a galaxy far, far away....
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@anandsunderraman
anandsunderraman / setChromeOptions.js
Last active May 10, 2024 15:17
Selenium Web Driver Set Chrome Options
//import the selenium web driver
var webdriver = require('selenium-webdriver');
var chromeCapabilities = webdriver.Capabilities.chrome();
//setting chrome options to start the browser fully maximized
var chromeOptions = {
'args': ['--test-type', '--start-maximized']
};
chromeCapabilities.set('chromeOptions', chromeOptions);
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build();
@marocchino
marocchino / 094607.md
Last active July 19, 2022 14:25
ES6시대의 JavaScript

ES6시대의 JavaScript

안녕하세요. 사원사업부의 마루야마@h13i32maru입니다. 최근의 Web 프론트엔드의 변화는 매우 격렬해서, 조금 눈을 땐 사이에 점점 새로운 것이 나오고 있더라구요. 그런 격렬한 변화중 하나가 ES6이라는 차세대 JavaScript의 사양입니다. 이 ES6는 현재 재정중으로 집필시점에서는 Draft Rev31이 공개되어있습니다.

JavaScript는 ECMAScript(ECMA262)라는 사양을 기반으로 구현되어있습니다. 현재 모던한 Web 브라우저는 ECMAScript 5.1th Edition을 기반으로 한 JavaScript실행 엔진을 탑재하고 있습니다. 그리고 다음 버전인 ECMAScript 6th Edition이 현재 재정중으로, 약칭으로 ES6이라는 명칭이 사용되고 있습니다.

@alisonailea
alisonailea / AwakenSpotify.scpt
Last active December 8, 2023 22:05
AppleScript to automate the Spotify playlist launch based on the time of day
--current time in seconds since midnight
set currentTime to (time of (current date))
## Morning
-- (04:00 - 10:30)
set morning to 37800
set morningVolume to 80
-- Happy: Wake Up in a Good Mood
set morningTrack to "spotify:user:116779154:playlist:5sYrf2RnhPY22meUSS5fUu"

Before reading, please consider I have poor English writing skills. Sorry. :(

What is 'Magenta'?

'Magenta' is Python script, which are made to crash PocketMine-MP servers, exactly PocketMine-Raklib.

How is it possible?

To understand this, you should know how Raklib's session system is working. Raklib creates every session per IP/Port to manage each clients, and these sessions are PHP objects.

They have many properties, such as $messageIndex, $address, $port, etc. What we need to play with is $preJoinQueue[] array. This contains MCPE DataPackets before a server-client handshake, and all stored packets will be processed after the connection process is completed. (See This)

@squarism
squarism / iterm2.md
Last active June 2, 2024 09:59
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)