Skip to content

Instantly share code, notes, and snippets.

View maotora's full-sized avatar
🏠
Working from home

Maotora ᕙ(⇀‸↼‶)ᕗ maotora

🏠
Working from home
View GitHub Profile
@Jean-Claude-D
Jean-Claude-D / countries.sql
Last active May 16, 2022 07:14 — forked from paulochf/countries.sql
Country data (phone country codes and ISO 3166-1 alpha-2 codes), tested on MySQL 8.0.17, for Win64 (x86_64)
DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (
`iso_code` char(2) PRIMARY KEY NOT NULL,
`name` varchar(80) NOT NULL,
`phone_code` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `countries`
--
@samuelcastro
samuelcastro / antd_sc_example.js
Created October 5, 2018 21:45 — forked from newswim/antd_sc_example.js
Wrapping Ant Design components with Styled Components
import { Link } from 'react-router-dom'
import { Badge, Col, Menu } from 'antd'
const StyledBadge = styled(Badge)`
.ant-badge-count {
background-color: #7ECBBF;
color: white;
box-shadow: 0 0 0 1px #d9d9d9 inset;
}
`
@woogists
woogists / wc-add-currency-symbol.php
Last active February 28, 2024 05:36
Add a custom currency / symbol
/**
* Custom currency and currency symbol
*/
add_filter( 'woocommerce_currencies', 'add_my_currency' );
function add_my_currency( $currencies ) {
$currencies['ABC'] = __( 'Currency name', 'woocommerce' );
return $currencies;
}
@nazrdogan
nazrdogan / radio.js
Created December 4, 2017 16:40
Redux-Form Radio Button NativeBase
export class RadioButton extends Component {
state = {
selectedIndex: -1
};
onSelected(index) {
this.setState({ selectedIndex: index });
let selectedValue = this.props.radioValues[index];
this.props.input.onChange(selectedValue);
}
render() {
@Slauta
Slauta / .gitlab-ci
Last active March 18, 2024 16:53
electron-updater from private repo gitlab.com
variables:
VERSION_ID: '1.0.$CI_PIPELINE_ID'
stages:
- build
build:
image: slauta93/electron-builder-win
stage: build
artifacts:
@cryzed
cryzed / fix-infinality.md
Last active April 30, 2024 22:01
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@itinance
itinance / package.json
Last active March 21, 2021 14:12
React Native: package.json: usefully tools for React Native that can be used with "npm run $name"
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --reset-cache",
"reset": "rm -rf node_modules/ && npm cache clear && watchman watch-del-all && npm i",
"testflight": "fastlane beta",
"android-device": "adb reverse tcp:8081 tcp:8081 && react-native run-android",
"lint": "jslint **.js",
"test": "jest",
"generate-apk": "cd android && ./gradlew assembleRelease && open ./app/build/outputs/apk/",
"install-apk": "cd android && ./gradlew installRelease"
},
require('../../customMultiSelect.css');
class Checkbox extends React.Component {
componentDidMount() { this.update(this.props.checked); }
componentWillReceiveProps(props) { this.update(props.checked); }
update(checked) {
ReactDOM.findDOMNode(this).indeterminate = checked === 'indeterminate';
}
render() {
return (
@samsch
samsch / ESNextFeatures.md
Last active January 24, 2017 17:21
Should I use ES Next features?

Specifically, read this if you are considering turning on and using pre-stage 4 features with Babel.

What are these stages?

If an item is at stage 4, it's finalized and ready to be included in the next iteration of the Javascript standard. These should always be as safe to use as current standard features. Features at stage 4 were pulled for ES2015 and ES2016 around January/Febuary of that year. It's reasonable to expect the same for ES2017, ES2018, etc.

If it's at stage 3, it shouldn't change much or at all, but it's not final. Stage 2 and lower are up for changes as needed. You can read the full process here.

If something that is implemented in Babel (pre-stage 4) is changed, or removed, what happens?

@paulochf
paulochf / countries.sql
Last active April 26, 2024 09:50 — forked from adhipg/countries.sql
Outdated. Used with discretion. Accepting updates.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;