Skip to content

Instantly share code, notes, and snippets.

View basuke's full-sized avatar
🍺
beer

Basuke Suzuki basuke

🍺
beer
View GitHub Profile

AAA

  • Ambitions - Goals that support our Focus
  • Actions - Work needed to accomplish our Ambitions
  • Achievements - How we measure success of our ActionsIntroducing

Actions & Achievements are a detailed plan for what and how you will achieve your ambition. This should include a list of activities and measurable desired outcomes for when the ambition has been accomplished.

Construct a stable environment to port open source project by merging upstream changes and building it.

@basuke
basuke / jenkins-control-flow.md
Last active May 25, 2023 23:35
Implementing Control Flow in Jenkins

if statement pattern

It's simple. You can use if statement in your pipeline script.

steps {
    script {
        if (condition) {
            // do something
        } else {
/*
* Copyright (C) 2022 Sony Interactive Entertainment Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@basuke
basuke / more_svn.py
Last active March 3, 2022 01:48
Quick svn equivalent of Git clean and restore
import os
import shutil
import svn.local
def svn_clean(path):
for e in svn.local.LocalClient(path).status():
if e.type_raw_name == 'unversioned':
name = e.name
if os.path.isdir(name):
#include <iostream>
int main(int argc, const char * argv[]) {
// insert code here...
std::cout
<< "sizeof(unsigned int) " << sizeof(unsigned int) << "\n"
<< "sizeof(unsigned) " << sizeof(unsigned) << "\n"
<< "sizeof(unsigned long) " << sizeof(unsigned long) << "\n"
<< "sizeof(size_t) " << sizeof(size_t) << "\n";
return 0;
@basuke
basuke / ascii-table.md
Last active August 10, 2022 16:26
table #13
0 1 2 3 4 5 6 7 8 9 A B C D E F
0x20 ! " # $ % & ' ( ) * + , - . /
0x30 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
0x40 @ A B C D E F G H I J K L M N O
0x50 P Q R S T U V W X Y Z [
@basuke
basuke / main.js
Created September 18, 2020 18:29
JPEG rotation. Copy piano.jpg from `examples/commodetto/docs/piano.jpg`
import JPEG from "commodetto/readJPEG";
import Poco from "commodetto/Poco";
import Resource from "Resource";
import config from "mc/config";
let poco = new Poco(screen, {rotation: config.rotation});
let gray = poco.makeColor(128, 128, 128);
poco.begin()
poco.fillRectangle(gray, 0, 0, poco.width, poco.height);
@basuke
basuke / create-vlog-project.py
Last active February 28, 2024 17:27
A python script to create a DaVinci Resolve project with today's date and import media files into default timeline.
import os
import sys
import datetime
from glob import glob
from argparse import ArgumentParser
# settings
projectNamePrefix = "vlog-"
presetName = "Default" # You have to define this preset by your self. <----
rss %
name
Vector 63291392 45.532768
StringImpl 22331392 16.065535
HashTable 11108352 7.991513
Misc. 8683520 6.247053
MetadataTable 5881856 4.231495
InstructionStream 3571712 2.569543
StringBuffer 3260416 2.345592
WeakBlock 1933312 1.390853
@basuke
basuke / win-namedtemporaryfile.py
Last active March 19, 2018 22:12
Windows tempfile.NamedTemporaryFile : research
a = tempfile.NamedTemporaryFile(delete=False)
file(a.name, 'r')
#>>> <open file 'c:\\users\\basuke\\appdata\\local\\temp\\tmpdclqbx', mode 'r' at 0x0000000009290DB0>
a = tempfile.NamedTemporaryFile(delete=True) # default
file(a.name, 'r')
#---------------------------------------------------------------------------
#IOError Traceback (most recent call last)
#<ipython-input-35-1cb82d16d8f2> in <module>()
#----> 1 file(a.name, 'r')