Skip to content

Instantly share code, notes, and snippets.

@xwiz
xwiz / sysctl.conf
Created February 11, 2023 23:19 — forked from chetth/sysctl.conf
TCP stack tuning for high traffic server.
net.ipv4.ip_forward=0
net.ipv4.tcp_fin_timeout = 60
net.ipv4.tcp_retries1 = 3
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 7200
net.ipv4.tcp_syn_retries = 5
kernel.sem = 250 32000 100 128
kernel.shmall = 209715200
kernel.shmmax = 214748364800
@xwiz
xwiz / 0_reuse_code.js
Created August 22, 2014 08:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/python
import flac.encoder as encoder
import pyaudio
import sys
import requests
import random
from threading import Thread
from Queue import Queue, Empty
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Security;
using Facebook;
using MyFacebookSite3434.Models;
namespace MyFacebookSite3434.Controllers
{
public class AccountController : Controller
select 'replacewithtablename' into @table;
select 'replacewithdatabasename' into @schema;
select concat('public class ',@table,'{')
union
select concat('public ',tps.dest,' ',column_name,'{get;set;}')
from information_schema.columns c
join (
select 'char' as orign ,'string' as dest union all
<?php
/**
* Grab Images from Wikipedia via thier API
*
* @author http://techslides.com
* @link http://techslides.com/grab-wikipedia-pictures-by-api-with-php
*/
//curl request returns json output via json_decode php function