Skip to content

Instantly share code, notes, and snippets.

lon9

Block or report user

Report or block lon9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lon9
lon9 / main.go
Created Jul 20, 2018
Discord voice bot
View main.go
package main
import (
"fmt"
"log"
"os"
"os/signal"
"strings"
"sync"
"syscall"
View gulpfile.js
var gulp = require("gulp");
var htmlmin = require("gulp-htmlmin");
var concat = require("gulp-concat");
var uglify = require("gulp-uglify");
var cleanCSS = require("gulp-clean-css");
gulp.task("minifyhtml", function(){
return gulp.src("src/views/*.html")
.pipe(concat("bundle.html"))
.pipe(htmlmin({collapseWhitespace: true}))
@lon9
lon9 / file0.go
Created Mar 24, 2016
Goで配列に対してビットワイズに任意の関数を適用する関数 ref: http://qiita.com/Rompei/items/6b2425fca744977fd3f9
View file0.go
package main
import "fmt"
func main() {
v := []float64{1,1,1,1}
fmt.Println(v+1)
}
View file0.go
package main
import (
"fmt"
"math/rand"
"runtime"
"sync"
"time"
)
@lon9
lon9 / file0.cpp
Last active Jan 10, 2016
値渡し、ポインタ渡し、参照渡しの違い ref: http://qiita.com/Rompei/items/e70e3b453cb485858062
View file0.cpp
#include<iostream>
using namespace std;
class MyClass{
public:
int getI();
void setI(int i);
private:
int i;
@lon9
lon9 / .vimrc
Last active Apr 9, 2016
vim configuration
View .vimrc
set number
set title
set ambiwidth=double
set tabstop=2
set expandtab
set shiftwidth=2
set hidden
set whichwrap=b,s,[,],<,>
set backspace=indent,eol,start
set nocompatible
View streaming.sh
#!/bin/bash
CMD_NAME=`basename $0`
SPACE=`tput cols`
FILE_NAME=
if [ $# -ne 1 ]; then
echo "USAGE: $CMD_NAME file_name"
exit 1
fi
@lon9
lon9 / getpass
Last active Oct 14, 2015
コンピュータ・ネットワーク、ネットワーク・セキュリティのpdfファイルのパスワードをmacのクリップボードにコピーする
View getpass
#!/bin/sh
CMDNAME=`basename $0`
CLASS=
if [ $# -ne 1 ]; then
echo "Usage: $CMDNAME <class-bunber>"
exit 1
fi
@lon9
lon9 / addpass
Last active Oct 14, 2015
コンピュータ・ネットワーク、ネットワーク・セキュリティのpdfファイルのパスワードをファイルに追加する
View addpass
#!/bin/sh
CMDNAME=`basename $0`
CLASS=
PASS=
if [ $# -ne 2 ]; then
echo "Usage: $CMDNAME <Class-bunber> <password>"
exit 1
fi
@lon9
lon9 / follow.py
Created Sep 10, 2015
Follow all follower and unfollow all follower who is not follow you.
View follow.py
import tweepy
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(OAUTH_TOKEN, OAUTH_SECRET)
api = tweepy.API(auth)
def follow():
followers = api.followers_ids()
friends = api.friends_ids()
You can’t perform that action at this time.