Skip to content

Instantly share code, notes, and snippets.

View ymyzk's full-sized avatar
:octocat:
Weekend OSS contributor

Yusuke Miyazaki ymyzk

:octocat:
Weekend OSS contributor
View GitHub Profile
@mattm7n
mattm7n / gist:1405067
Created November 29, 2011 14:54
Monitor DHCP traffic with tcpdump
# Monitoring on interface eth0
tcpdump -i eth0 -n port 67 and port 68
@dericcrago
dericcrago / gist:1886177
Created February 22, 2012 17:25
add trailing slash to Backbone.Model urls
// example
User = Backbone.Model.extend({
url: function() {
var origUrl = Backbone.Model.prototype.url.call(this);
return origUrl + (origUrl.charAt(origUrl.length - 1) == '/' ? '' : '/');
}
});
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@hayajo
hayajo / changelog_en.md
Last active November 2, 2024 12:48
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@copitux
copitux / filters.py
Last active December 18, 2015 11:09
Iso 8601 DateTimeFilter to Django Rest Framework and django-filter
"""
The MIT License (MIT)
Copyright (c) <2013> <David Medina>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mariuz
mariuz / emperor.sh
Last active August 26, 2020 12:59
uwsgi emperor init script for debian 7.x
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: emperor
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the uwsgi emperor app server
# Description: starts uwsgi emperor app server using start-stop-daemon
@mlouro
mlouro / gulpfile.js
Last active October 12, 2024 17:14
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
@lotz84
lotz84 / Layout.swift
Last active August 29, 2015 14:07
Table layout in Swift
import UIKit
infix operator ||| { associativity left precedence 80 }
func ||| (lhs: Layout.Panel, rhs: Layout.Panel) -> Layout.Panel {
return Layout.Panel(forkType: .Horizontal , panel1: lhs, panel2: rhs)
}
infix operator --- { associativity left precedence 80 }
func --- (lhs: Layout.Panel, rhs: Layout.Panel) -> Layout.Panel {
return Layout.Panel(forkType: .Vertical , panel1: lhs, panel2: rhs)
@1natsu172
1natsu172 / .eslintrc
Last active October 9, 2024 03:43
My airbnb based ESLint config for "typescript-eslint" with React & prettier
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"jest/globals": true
},