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
@1natsu172
1natsu172 / .eslintrc
Last active July 5, 2023 10:23
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
},
@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)
@mlouro
mlouro / gulpfile.js
Last active June 21, 2022 23:20
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');
@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
@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
@hayajo
hayajo / changelog_en.md
Last active May 3, 2024 08:29
ChangeLog を支える英語

ChangeLog を支える英語

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

ほとんど引用です。

基本形

@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

@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) == '/' ? '' : '/');
}
});
@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