Skip to content

Instantly share code, notes, and snippets.

View laprasdrum's full-sized avatar
🥁
(drumroll)

laprasdrum laprasdrum

🥁
(drumroll)
View GitHub Profile
@laprasdrum
laprasdrum / YMGraphCell.h
Created June 19, 2012 05:57
UIKitの遅延描画(改)
#import <UIKit/UIKit.h>
@interface YMGraphCell : UIView
// オーバーライドして、遅延描画
- (void)drawRectAsync:(CGRect)rect andContext:(CGContextRef)context;
@end
@laprasdrum
laprasdrum / hideHiddenFilesInFinder
Created October 1, 2012 06:02
Finderでの隠しファイルの表示/非表示
#!/bin/sh
defaults delete com.apple.finder AppleShowAllFiles
killall Finder
@laprasdrum
laprasdrum / cdIphoneSimulator
Created November 23, 2012 07:53
iPhone SimulatorのPath忘れる自分のためのスクリプト
#!/bin/sh
cd ~/Library/Application\ Support/iPhone\ Simulator/
@laprasdrum
laprasdrum / Blockdiag Error Code(class)
Last active December 15, 2015 12:39
Error code for blockdiag with class definition
blockdiag {
default_fontsize = 18;
orientation = portrait;
class page [shape = "roundedbox",textcolor = #ffffff,color = #1f497d];
class popup [shape = "roundedbox",textcolor = #ffffff,color = #4bacc7];
class condition[shape = "diamond",textcolor = #000000];
// node description
a [class = "page", label = "TOP\nhogehoge"];
d [class = "popup"];
@laprasdrum
laprasdrum / 2dimension_array
Created April 23, 2013 11:33
2 dimension array with range check
#include <iostream>
using namespace std;
class safetyArray {
char **array_;
int row_size_;
int column_size_;
public:
safetyArray(int row_size, int column_size);
@interface HogeViewController : UIViewController <UIAccelerometerDelegate>{
...
@laprasdrum
laprasdrum / SpongyCastleSample.java
Created April 19, 2014 10:53
convert X.509 certificate into PEM-formatted file with SpongyCastle
static {
Security.insertProviderAt(new org.spongycastle.jce.provider.BouncyCastleProvider(), 1);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
package main
import (
"fmt"
"math/cmplx"
)
func Cbrt(x complex128) complex128 {
var z complex128 = 1.0
for {
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
seperate := strings.Split(s, " ")
result := make(map[string]int)
@laprasdrum
laprasdrum / cVimrc
Last active November 1, 2023 23:29
"Settings
let scrolltep = 60
let fullpagescrollpercent = 100
"set nohud
set autohidecursor
"set noinsertmappings
set nosmoothscroll
let blacklists = ["https://app.gather.town/*", "https://editor.note.com/*", "https://www.notion.so/*", "https://drive.mindmup.com/*", "https://app.clubhouse.io/*", "https://app.clickup.com/*", "https://app.classdo.com/*", "https://*.typeform.com/*", "https://magic-pod.com/*", "https://miro.com/app/*", "https://web.omnifocus.com/*", "https://developer.apple.com/*", "https://*.youtube.com/*", "https://*.1password.com", "https://*.slack.com/*", "https://kanbanflow.com/*", "https://trello.com/*", "https://workflowy.com/*", "https://app.zeplin.io/*", "https://*.google.com/*", "https://*classdo.*/*"]
let mapleader = ","
"let locale = "jp"