Skip to content

Instantly share code, notes, and snippets.

#include <mach/mach_init.h>
#include <mach/port.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
int main() {
for (;;) {
pid_t pid = fork();
if (pid == 0) execv("/usr/bin/true", NULL);
@pebreo
pebreo / django-jquery-demo.py
Last active April 29, 2020 05:15
jQuery AJAX + Django SIMPLE DEMO
# views.py - django app called ajx
from django.shortcuts import render, get_object_or_404, redirect, HttpResponse, render_to_response, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth import authenticate, login
import json
def mygetview(request):
if request.method == 'GET':
@hnaohiro
hnaohiro / go-twitter
Last active September 13, 2019 12:13
GolangでTwitter OAuthを使うサンプル
package main
import (
"fmt"
"log"
"io/ioutil"
"encoding/json"
"github.com/mrjones/oauth"
)