Skip to content

Instantly share code, notes, and snippets.

View acro5piano's full-sized avatar
🏠
Working from home

Kay Gosho acro5piano

🏠
Working from home
View GitHub Profile
@andrassomogyi
andrassomogyi / AViewController.h
Created September 25, 2015 09:43
SFSafariViewController Objective-C example
#import <UIKit/UIKit.h>
@import SafariServices;
@interface AViewController : UIViewController
//
// ...
//
@end
@voluntas
voluntas / webrtc.rst
Last active March 28, 2025 06:01
WebRTC コトハジメ
@LouisBrunner
LouisBrunner / mupen64 Xbox360 Controller config
Last active April 17, 2023 02:53
Configuration for the Xbox360 controller to use with Nintendo 64 emulator mupen64
[Xbox 360 Wired Controller]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = "button(3)"
DPad L = "button(2)"
DPad D = "button(0)"
DPad U = "button(1)"
@voxxit
voxxit / Dockerfile
Last active April 6, 2022 01:52
nginx v1.9.3 Dockerfile with HTTP/2 support baked in!
FROM alpine:latest
MAINTAINER Joshua Delsman <[email protected]>
EXPOSE 443
ENV NGINX_VERSION 1.9.3
RUN apk add --update openssl-dev pcre-dev zlib-dev build-base \
&& rm -rf /var/cache/apk/* \
@jwalton512
jwalton512 / Api\Admin\TestCase.php
Created August 9, 2015 08:46
Api Testing With Laravel 5.1 (jwt-auth)
<?php
namespace Tests\Api;
use App\User;
use Tests\TestCase as BaseTestCase;
use Illuminate\Contracts\Auth\Authenticatable as UserContract;
class TestCase extends BaseTestCase
{
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active March 24, 2025 23:12
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@vasanthk
vasanthk / react-folder-structure.md
Last active June 25, 2024 03:23 — forked from ryanflorence/folder-structure.md
React Folder Structure

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@toast38coza
toast38coza / commands
Last active March 3, 2022 11:30
Simple systemd unit for running a django app
# start / stop / restart / status
systemctl start test
systemctl stop test
systemctl restart test
systemctl status test
# logs use journalctl:
# tail the logs for unit `django`
journalctl -f -u django
@arairait
arairait / gist:e56f214b03efebba4a28
Last active May 5, 2020 11:48
NASなどのARM LinuxでCIFSマウントする方法
マウント用コマンドのインストール。
# apt-get install cifs-utils
これでmount.cifsが入ったはず。確認する。
# which mount.cifs
/sbin/mount.cifs
OK。
マウントしてみる。
# mount -t cifs -o username=hoge,password=hoge //server/share /mnt/windows
@almost
almost / 1-react-native-simulator-and-device.md
Last active November 17, 2022 14:05
Test React Native on the simulator and on a device without editing the code each time!

In the default React Native app scaffolding you have to edit AppDelegate.m to change where it loads the code if you want to test on your device. I use the following snippet to detect if it's being compiled for Debug or Production and for the Simulator or a device. For Production it uses a copy of the code included in the bundle, for Debug on the simualtor it loads from a server on localhost and for Debug on a device it loads from a server on a given IP address.

NOTE: You need to edit YOUR-IP-HERE and change it to the IP to load the code from when in Debug mode on a device. You could use a service like ngrok to make this work from anywhere.

  NSURL *jsCodeLocation;

  // Loading JavaScript code
  #if DEBUG
    // For Debug build load from development server. Start the server from the repository root: