Skip to content

Instantly share code, notes, and snippets.

View solicomo's full-sized avatar

Soli Como solicomo

View GitHub Profile
@solicomo
solicomo / .minttyrc
Created March 8, 2024 15:01
Git-Bash Colors/Theme
Font=DejaVu Sans Mono
FontHeight=12
Columns=256
Rows=80
ScrollbackLines=102400000
ClipShortcuts=yes
RightClickAction=paste
Term=xterm-256color
Answerback=xterm-256color
OpaqueWhenFocused=yes
@solicomo
solicomo / myip
Last active November 5, 2023 20:11
myip
#!/bin/sh
curl -s https://1.1.1.1/cdn-cgi/trace | grep "ip=" | cut -d= -f 2
@solicomo
solicomo / disable-power-save.md
Created January 27, 2019 00:15
[Pi 3B+] disable power save on CentOS 7
# yum install -y iw
# iw dev wlan0 set power-save off
@solicomo
solicomo / cf_ddns.py
Created January 14, 2019 04:16
CloudFlare Dynamic DNS
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
import sys
import requests
import json
from datetime import datetime
EMAIL='Your Email'
APIKEY='Your API Key from CloudFlare'
@solicomo
solicomo / X-Apple-I-FD-Client-Info.js
Created March 16, 2018 04:14 — forked from borgle/X-Apple-I-FD-Client-Info.js
在访问 https://appleid.apple.com/account?&localang=CN-ZH 这个页面的时候,页面会ajax一个特殊的header请求,其中的X-Apple-I-FD-Client-Info信息是一个json对象,本gist是整理后的F值获取方式源码。
(function(m) {
function g(e) {
try {
if (navigator.plugins && navigator.plugins.length)
for (var t = 0; t < navigator.plugins.length; t++) {
var n = navigator.plugins[t];
if (n.name.indexOf(e) >= 0)
return n.name + (n.description ? "|" + n.description : "")
}
} catch (r) {}
@solicomo
solicomo / files_in.php
Last active December 8, 2016 09:02
[PHP] get all files in a path
<?php
function files_in($path, $types = 'f', $recursive = false)
{
$files = array();
//$path = realpath($path);
$dirs = new RecursiveDirectoryIterator($path);
$dirs->setFlags($dirs->getFlags() | FilesystemIterator::SKIP_DOTS);
@solicomo
solicomo / bs3-stacked-tabs.less
Created November 3, 2015 14:44 — forked from lavoiesl/bs3-stacked-tabs.less
Add tabs-left, tabs-right and tabs-below in bootstrap 3 Credit: http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3
// http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3
.tabs-below, .tabs-right, .tabs-left {
.nav-tabs {
border-bottom: 0;
}
}
.tab-content > .tab-pane,
.pill-content > .pill-pane {
display: none;
#include <string>
#include <typeinfo>
#include <iostream>
int main()
{
std::string s1("mark "), s2("liu");
auto iter = s1.end();
std::cout << "iter is a " << typeid(iter).name() << std::endl;
std::cout << "void is a " << typeid(void).name() << std::endl;
@solicomo
solicomo / read-excel-using-csharp.cs
Created October 28, 2014 01:47
Read Excel Using C#
using System;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
@solicomo
solicomo / talkaholic-404.html
Created July 16, 2014 14:04
Talkaholic 404(话唠版404页面)
<HTML><HEAD><TITLE>404 Not Found</TITLE>
</HEAD>
<BODY text=#000000 link=#0000ff bgColor=#ffffff onload=stuff()>
<H1>404 - Not Found</H1>
I'm sorry, dear visitor, but the requested URL was not found on this server. You can <a href="/" style="text-decoration:none;">back to homepage</a>.
<P>
<HR>
<SCRIPT language=Javascript>
var tl=new Array(